Compare commits
27 Commits
8ce471ee1e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| bee5967a9e | |||
| 6c66015eb1 | |||
| f0cffa8e71 | |||
| 8f2b1e2592 | |||
| 1549a48045 | |||
| baeb0f875e | |||
| 2543ee1b2c | |||
| e7e67b9a7b | |||
| f2a6e41fdc | |||
| ff24653bf6 | |||
| b4f8952faf | |||
| e7486a5d18 | |||
| fdb7588df1 | |||
| fc66a0d989 | |||
| b8a72302e2 | |||
| 248e90a630 | |||
| d663db8253 | |||
| f237abd07f | |||
| 0eddd039fb | |||
| 0f1fbd6767 | |||
| d2e48d2904 | |||
| f101701806 | |||
| 76d5f10104 | |||
| de989d4af8 | |||
| 4c561b1288 | |||
| e9f840e80d | |||
| 45d582c219 |
20
flake.lock
generated
20
flake.lock
generated
@@ -6,11 +6,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692255291,
|
||||
"narHash": "sha256-JB3M8OvT5QXqbAjVSGOWKm+X7SCxsk7sbAPVQNdlMJo=",
|
||||
"lastModified": 1695886107,
|
||||
"narHash": "sha256-8Dc3clsOVK8qbXqvPn7tlr/A60JFy/7LYXG9D19Fv5U=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "ec418a9f2fb9094be93f2d6870113a388cd62a06",
|
||||
"revCount": 7,
|
||||
"rev": "88a3362b58f30d99084793aa10cbda3886ab65f2",
|
||||
"revCount": 10,
|
||||
"type": "git",
|
||||
"url": "https://git.dripco.eu/nic/etherlab-nix"
|
||||
},
|
||||
@@ -22,11 +22,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -70,11 +70,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1653845079,
|
||||
"narHash": "sha256-7ghaQZ+7JXLI9FgNH8+RQHAt3/ubT92j8NtjZleP6t4=",
|
||||
"lastModified": 1697723726,
|
||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b62ada430501de88dfbb08cea4eb98ead3a5e3e7",
|
||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-compat, etherlab }@inputs:
|
||||
let
|
||||
etherlab-pkgs = system: etherlab.packages.${system};
|
||||
systems = nixpkgs.lib.platforms.linux;
|
||||
lib = nixpkgs.lib;
|
||||
packagePaths = lib.mapAttrs (n: v: "${./packages}/${n}") (lib.filterAttrs (n: v: v == "directory" && (builtins.readDir "${./packages}/${n}") ? "default.nix") (builtins.readDir ./packages));
|
||||
in rec {
|
||||
packages = lib.genAttrs systems (system: lib.mapAttrs (n: v: lib.callPackageWith ((lib.recursiveUpdate packages.${system} nixpkgs.legacyPackages.${system}) // { inherit inputs; inherit system; etherlab = (etherlab-pkgs system); }) v {}) packagePaths);
|
||||
packages = lib.genAttrs systems (system:
|
||||
lib.mapAttrs (n: v:
|
||||
lib.callPackageWith ((lib.recursiveUpdate packages.${system} nixpkgs.legacyPackages.${system}) // { inherit inputs; inherit system; } // etherlab.packages.${system}) v {}) packagePaths);
|
||||
legacyPackages = packages;
|
||||
overlay = final: prev: (lib.mapAttrs (n: v: prev.callPackage v { }) packagePaths);
|
||||
nixosModules = { linuxcnc = import ./modules/linuxcnc.nix; };
|
||||
|
||||
@@ -2,11 +2,31 @@
|
||||
let
|
||||
cfg = config.local.packages.linuxcnc;
|
||||
inherit (builtins) filter map pathExists listToAttrs;
|
||||
linuxcncWithEC = pkgs.linuxcnc.overrideAttrs (oldAttrs: {
|
||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.linuxcnc-ethercat pkgs.hal-cia402 ];
|
||||
postInstall = oldAttrs.postInstall + ''
|
||||
ln -s ${pkgs.linuxcnc-ethercat}/bin/* $out/bin/
|
||||
ln -s ${pkgs.linuxcnc-ethercat}/lib/linuxcnc/modules/* $out/lib/linuxcnc/modules/
|
||||
ln -s ${pkgs.linuxcnc-ethercat}/share/linuxcnc-ethercat $out/share/
|
||||
|
||||
ln -s ${pkgs.hal-cia402}/lib/linuxcnc/modules/* $out/lib/linuxcnc/modules/
|
||||
'';
|
||||
});
|
||||
|
||||
pythonPkg = (pkgs.python3Full.withPackages (ps: [
|
||||
ps.pyserial # for camera feedback into linuxcnc
|
||||
]));
|
||||
|
||||
linuxcncEnv = pkgs.buildEnv {
|
||||
name = "linuxcnc-env";
|
||||
paths = with pkgs; [ linuxcncWithEC hal-cia402 linuxcnc-ethercat pythonPkg ];
|
||||
};
|
||||
|
||||
in {
|
||||
options.local.packages.linuxcnc.enable = lib.mkEnableOption "Enable linuxcnc";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ linuxcnc ];
|
||||
environment.systemPackages = with pkgs; [ linuxcncEnv ];
|
||||
|
||||
security.wrappers = listToAttrs (map (f: {
|
||||
name = f;
|
||||
@@ -14,8 +34,8 @@ in {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${pkgs.linuxcnc}/bin/${f}-nosetuid";
|
||||
source = "${linuxcncWithEC}/bin/${f}-nosetuid";
|
||||
};
|
||||
}) (filter (f: pathExists "${pkgs.linuxcnc}/bin/${f}-nosetuid") pkgs.linuxcnc.setuidApps));
|
||||
}) (filter (f: pathExists "${linuxcncWithEC}/bin/${f}-nosetuid") linuxcncWithEC.setuidApps));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, stdenv, linuxcnc, etherlab }:
|
||||
{ config, lib, pkgs, stdenv, linuxcnc, ethercat }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
@@ -13,11 +13,22 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "SjFkcNl/4AlsMeIw5Hg9Kp5mIIV9KFUYodXV6lAi3/A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [ which expat ];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
which
|
||||
expat
|
||||
];
|
||||
|
||||
buildInputs = [ linuxcnc etherlab.ethercat ];
|
||||
buildInputs = [ linuxcnc ethercat ];
|
||||
|
||||
installFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
#"RUN_IN_PLACE=YES"
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
"EMC2_HOME=''"
|
||||
"LIBDIR=''"
|
||||
"RTLIBDIR='/lib/linuxcnc/modules'"
|
||||
];
|
||||
|
||||
installFlags = [ "DESTDIR=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LinuxCNC ethercat interop";
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
{ lib, stdenv, autoreconfHook, wrapGAppsHook, qt5, makeWrapper, fetchFromGitHub, libtool, pkgconfig,
|
||||
readline_5, ncurses, libtirpc, systemd, libmodbus, libusb, glib, gtk2, gtk3, procps, kmod, sysctl,
|
||||
util-linux, psmisc, intltool, tcl, tk, bwidget, tkimg, tclx, tkblt, pango, cairo, boost, espeak, gst_all_1,
|
||||
python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash,
|
||||
hal-cia402, linuxcnc-ethercat
|
||||
}:
|
||||
let
|
||||
pythonPkg = (python3Full.withPackages (ps: [
|
||||
yapps
|
||||
ps.pyopengl
|
||||
ps.pygobject3
|
||||
ps.pycairo
|
||||
ps.boost
|
||||
ps.numpy
|
||||
ps.pyqtwebengine
|
||||
ps.pyqt5
|
||||
ps.opencv4
|
||||
ps.gst-python
|
||||
ps.xlib
|
||||
ps.qscintilla
|
||||
]));
|
||||
boost_python = (boost.override { enablePython = true; python = pythonPkg; });
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
hardeningDisable = [ "all" ];
|
||||
enableParallelBuilding = true;
|
||||
pname = "linuxcnc";
|
||||
version = "2.9-git";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LinuxCNC";
|
||||
repo = "linuxcnc";
|
||||
rev = "f77537cd4d4dc6191d4bb981e0e1c9d897039fc6";
|
||||
sha256 = "05kuTx2J7wdrcoUQ8Tengb0ohXAeGjZV9g9XriWgQL4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
qt5.wrapQtAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
dontWrapQtApps = true;
|
||||
|
||||
buildInputs = [
|
||||
libtool pkgconfig libtirpc systemd libmodbus libusb glib gtk2 gtk3 procps kmod sysctl util-linux
|
||||
psmisc intltool tcl tk bwidget tkimg tclx tkblt pango cairo pythonPkg.pkgs.pygobject3 gobject-introspection
|
||||
boost_python pythonPkg.pkgs.boost pythonPkg qt5.qtbase espeak gst_all_1.gstreamer
|
||||
ncurses readline_5 libGLU xorg.libXmu libepoxy hicolor-icon-theme glxinfo
|
||||
hal-cia402 linuxcnc-ethercat
|
||||
];
|
||||
|
||||
preAutoreconf = ''
|
||||
# cd into ./src here instead of setting sourceRoot as the build process uses the original sourceRoot
|
||||
cd ./src
|
||||
|
||||
# make halcmd search for setuid apps on PATH, to find setuid wrappers
|
||||
substituteInPlace hal/utils/halcmd_commands.c --replace 'EMC2_BIN_DIR "/' '"'
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./fix_make.patch # Some lines don't respect --prefix
|
||||
./pncconf_paths.patch # Corrects a search path in pncconf
|
||||
./rtapi_app_setuid.patch # Remove hard coded checks for setuid from rtapi_app
|
||||
];
|
||||
|
||||
postAutoreconf = ''
|
||||
# We need -lncurses for -lreadline, but the configure script discards the env set by NixOS before checking for -lreadline
|
||||
substituteInPlace configure --replace '-lreadline' '-lreadline -lncurses'
|
||||
|
||||
substituteInPlace emc/usr_intf/pncconf/private_data.py --replace '/usr/share/themes' '${gtk3}/share/themes'
|
||||
substituteInPlace emc/usr_intf/pncconf/private_data.py --replace 'self.FIRMDIR = "/lib/firmware/hm2/"' 'self.FIRMDIR = os.environ.get("HM2_FIRMWARE_DIR", "${placeholder "out"}/firmware/hm2")'
|
||||
|
||||
substituteInPlace hal/drivers/mesa-hostmot2/hm2_eth.c --replace '/sbin/iptables' '/run/current-system/sw/bin/iptables'
|
||||
substituteInPlace hal/drivers/mesa-hostmot2/hm2_eth.c --replace '/sbin/sysctl' '${sysctl}/bin/sysctl'
|
||||
substituteInPlace hal/drivers/mesa-hostmot2/hm2_rpspi.c --replace '/sbin/modprobe' '${kmod}/bin/modprobe'
|
||||
substituteInPlace hal/drivers/mesa-hostmot2/hm2_rpspi.c --replace '/sbin/rmmod' '${kmod}/bin/rmmod'
|
||||
substituteInPlace module_helper/module_helper.c --replace '/sbin/insmod' '${kmod}/bin/insmod'
|
||||
substituteInPlace module_helper/module_helper.c --replace '/sbin/rmmod' '${kmod}/bin/rmmod'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-tclConfig=${tcl}/lib/tclConfig.sh"
|
||||
"--with-tkConfig=${tk}/lib/tkConfig.sh"
|
||||
"--with-boost-libdir=${boost_python}/lib"
|
||||
"--with-boost-python=boost_python3"
|
||||
"--with-locale-dir=$(out)/locale"
|
||||
"--exec-prefix=${placeholder "out"}"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
# Stop the Makefile attempting to set ownship+perms, it fails on NixOS
|
||||
sed -i -e 's/chown.*//' -e 's/-o root//g' -e 's/-m [0-9]\+//g' Makefile
|
||||
'';
|
||||
|
||||
installFlags = [ "SITEPY=${placeholder "out"}/${pythonPkg.sitePackages}" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/firmware/hm2"
|
||||
'';
|
||||
|
||||
# Binaries listed here are renamed to ${filename}-nosetuid, to be targetted by setuid wrappers
|
||||
setuidApps = [ "rtapi_app" "linuxcnc_module_helper" "pci_write" "pci_read" ];
|
||||
|
||||
preFixup = ''
|
||||
for prog in $(find $out/bin -type f ! \( ${lib.concatMapStringsSep " -o " (f: "-name " + f + " ") setuidApps} \)); do
|
||||
wrapProgram "$prog" \
|
||||
--prefix PATH : ${lib.makeBinPath [tk glxinfo]} \
|
||||
--prefix TCLLIBPATH ' ' "$out/lib/tcltk/linuxcnc ${tk}/lib ${tcl}/lib ${tclx}/lib ${tkblt}/lib ${tkimg}/lib ${bwidget}/lib/bwidget${bwidget.version}" \
|
||||
--prefix PYTHONPATH : "${pythonPkg}/${pythonPkg.sitePackages}:$out/${pythonPkg.sitePackages}" \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
"''${qtWrapperArgs[@]}"
|
||||
done
|
||||
for prog in $(find $out/bin -type f \( ${lib.concatMapStringsSep " -o " (f: "-name " + f + " ") setuidApps} \)); do
|
||||
mv "$prog" "$prog-nosetuid"
|
||||
done
|
||||
'';
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 5bde17598d..856af19e08 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -616,9 +616,9 @@ install: install-kernel-dep install-kernel-indep
|
||||
install-dirs:
|
||||
$(DIR) $(DESTDIR)$(EMC2_RTLIB_DIR) \
|
||||
$(DESTDIR)$(sysconfdir)/linuxcnc $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) \
|
||||
- $(DESTDIR)/lib/linuxcnc $(DESTDIR)$(includedir)/linuxcnc \
|
||||
+ $(DESTDIR)$(prefix)/lib/linuxcnc $(DESTDIR)$(includedir)/linuxcnc \
|
||||
$(DESTDIR)$(docsdir) $(DESTDIR)$(ncfilesdir) \
|
||||
- $(DESTDIR)/etc/X11/app-defaults $(DESTDIR)$(tcldir)/bin \
|
||||
+ $(DESTDIR)$(prefix)/etc/X11/app-defaults $(DESTDIR)$(tcldir)/bin \
|
||||
$(DESTDIR)$(tcldir)/scripts \
|
||||
$(DESTDIR)$(mandir)/man1 \
|
||||
$(DESTDIR)$(mandir)/man3 \
|
||||
@@ -686,7 +686,7 @@ install-kernel-indep: install-dirs
|
||||
$(FILE) $(DOCS_HELP) $(DESTDIR)$(docsdir)
|
||||
$(TREE) $(NC_FILES) $(DESTDIR)$(ncfilesdir)
|
||||
$(EXE) ../nc_files/M101 $(DESTDIR)$(ncfilesdir)
|
||||
- $(FILE) ../tcl/TkLinuxCNC $(DESTDIR)/etc/X11/app-defaults
|
||||
+ $(FILE) ../tcl/TkLinuxCNC $(DESTDIR)$(prefix)/etc/X11/app-defaults
|
||||
$(FILE) Makefile.modinc $(DESTDIR)$(datadir)/linuxcnc
|
||||
$(EXE) $(TCL) $(DESTDIR)$(tcldir)
|
||||
$(FILE) ../tcl/hal.so $(DESTDIR)$(tcldir)
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/src/emc/usr_intf/pncconf/private_data.py b/src/emc/usr_intf/pncconf/private_data.py
|
||||
index 7bb8127ea4..88e99934ca 100644
|
||||
--- a/src/emc/usr_intf/pncconf/private_data.py
|
||||
+++ b/src/emc/usr_intf/pncconf/private_data.py
|
||||
@@ -74,7 +74,7 @@ class Private_Data:
|
||||
self._METRIC = 1
|
||||
|
||||
self.DATADIR = linuxcnc.SHARE + "/linuxcnc/pncconf"
|
||||
- self.WIZARD = os.path.join(self.DATADIR, "linuxcnc-wizard.gif")
|
||||
+ self.WIZARD = linuxcnc.SHARE + "/linuxcnc/linuxcnc-wizard.gif"
|
||||
if not os.path.isfile(self.WIZARD):
|
||||
self.WIZARD = os.path.join("/etc/linuxcnc/linuxcnc-wizard.gif")
|
||||
if not os.path.isfile(self.WIZARD):
|
||||
@@ -1,19 +0,0 @@
|
||||
diff --git a/src/rtapi/uspace_common.h b/src/rtapi/uspace_common.h
|
||||
index 8dde420142..f9ff6f0cb2 100644
|
||||
--- a/src/rtapi/uspace_common.h
|
||||
+++ b/src/rtapi/uspace_common.h
|
||||
@@ -381,9 +381,11 @@ static int detect_env_override() {
|
||||
|
||||
static int detect_realtime() {
|
||||
struct stat st;
|
||||
- if ((stat(EMC2_BIN_DIR "/rtapi_app", &st) < 0)
|
||||
- || st.st_uid != 0 || !(st.st_mode & S_ISUID))
|
||||
- return 0;
|
||||
+ //setuid programs are forbidden from the nix store, a wrapper outside of the store is created instead
|
||||
+ //this check fails under those circumstances, disable it and hope for the best
|
||||
+ /* if ((stat(EMC2_BIN_DIR "/rtapi_app", &st) < 0) */
|
||||
+ /* || st.st_uid != 0 || !(st.st_mode & S_ISUID)) */
|
||||
+ /* return 0; */
|
||||
return detect_env_override() || detect_preempt_rt() || detect_rtai() || detect_xenomai();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, autoreconfHook, wrapGAppsHook, qt5, makeWrapper, fetchFromGitHub, libtool, pkgconfig,
|
||||
{ lib, stdenv, autoreconfHook, wrapGAppsHook, qt5, makeWrapper, fetchFromGitHub, libtool, pkg-config,
|
||||
readline_5, ncurses, libtirpc, systemd, libmodbus, libusb, glib, gtk2, gtk3, procps, kmod, sysctl,
|
||||
util-linux, psmisc, intltool, tcl, tk, bwidget, tkimg, tclx, tkblt, pango, cairo, boost, espeak, gst_all_1,
|
||||
python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash
|
||||
@@ -6,6 +6,7 @@
|
||||
let
|
||||
pythonPkg = (python3Full.withPackages (ps: [
|
||||
yapps
|
||||
ps.pyserial # for camera feedback into linuxcnc
|
||||
ps.pyopengl
|
||||
ps.pygobject3
|
||||
ps.pycairo
|
||||
@@ -46,7 +47,7 @@ stdenv.mkDerivation rec {
|
||||
dontWrapQtApps = true;
|
||||
|
||||
buildInputs = [
|
||||
libtool pkgconfig libtirpc systemd libmodbus libusb glib gtk2 gtk3 procps kmod sysctl util-linux
|
||||
libtool pkg-config libtirpc systemd libmodbus libusb glib gtk2 gtk3 procps kmod sysctl util-linux
|
||||
psmisc intltool tcl tk bwidget tkimg tclx tkblt pango cairo pythonPkg.pkgs.pygobject3 gobject-introspection
|
||||
boost_python pythonPkg.pkgs.boost pythonPkg qt5.qtbase espeak gst_all_1.gstreamer
|
||||
ncurses readline_5 libGLU xorg.libXmu libepoxy hicolor-icon-theme glxinfo
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
{ lib, writeText, fetchurl, tcl, tk, tcllib, zlib, libjpeg, libpng, libtiff }:
|
||||
tcl.mkTclDerivation rec {
|
||||
pname = "tkimg";
|
||||
version = "1.4.13";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tkimg/tkimg/1.4/tkimg%201.4.13/Img-1.4.13-Source.tar.gz";
|
||||
sha256 = "0qyi80f9zwlx8sx9km0d1wfa2d3x846g10ag4gqxqllpmlf8r1ph";
|
||||
};
|
||||
|
||||
# Some platforms encounter runtime errors if compiled with the libs bundled in the source tree
|
||||
# system_libs.patch is a combined set of patches taken from debian allowing compiling with system libs
|
||||
# but hardcodes /usr/include/, this hacky fix sets nix store paths inside the patch
|
||||
patches = with builtins; [ (writeText "fixed_patch" (replaceStrings
|
||||
["/usr/include/zlib.h" "/usr/include/png.h"
|
||||
"/usr/include/jpeglib.h" "/usr/include/jerror.h"]
|
||||
["${zlib.dev}/include/zlib.h" "${libpng.dev}/include/png.h"
|
||||
"${libjpeg.dev}/include/jpeglib.h" "${libjpeg.dev}/include/jerror.h"]
|
||||
(readFile ./system_libs.patch))) ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://sourceforge.net/projects/tkimg/";
|
||||
description = "This package enhances Tk, adding support for many other Image formats: BMP, XBM, XPM, GIF (with transparency, but without LZW), PNG, JPEG, TIFF and postscript.";
|
||||
license = lib.licenses.tcltk;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
buildInputs = [ tcl tk.dev tk tcllib zlib.dev zlib libjpeg.dev libjpeg libpng.dev libpng libtiff.dev libtiff];
|
||||
|
||||
configureFlags = [
|
||||
"--with-tcl=${tcl}/lib"
|
||||
"--with-tk=${tk}/lib"
|
||||
"--with-tkinclude=${tk.dev}/include"
|
||||
];
|
||||
}
|
||||
@@ -1,609 +0,0 @@
|
||||
diff --git a/libjpeg/Makefile.in b/libjpeg/Makefile.in
|
||||
index 021f2b5..9780c04 100755
|
||||
--- a/libjpeg/Makefile.in
|
||||
+++ b/libjpeg/Makefile.in
|
||||
@@ -149,9 +149,9 @@ DEFS = @DEFS@ $(PKG_CFLAGS)
|
||||
CONFIG_CLEAN_FILES = Makefile
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
-LIBS = @PKG_LIBS@ @LIBS@
|
||||
+LIBS = @PKG_LIBS@ @LIBS@ -ljpeg
|
||||
AR = @AR@
|
||||
-CFLAGS = @CFLAGS@ -DJPEGTCLAPI=MODULE_SCOPE -I$(srcdir)/../base
|
||||
+CFLAGS = @CFLAGS@ -DJPEGTCLAPI=MODULE_SCOPE -I$(srcdir)/../base -DMODULE_SCOPE=extern
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
#========================================================================
|
||||
diff --git a/libjpeg/configure b/libjpeg/configure
|
||||
index 22f9cdc..4772eed 100755
|
||||
--- a/libjpeg/configure
|
||||
+++ b/libjpeg/configure
|
||||
@@ -5158,60 +5158,6 @@ JPEG_CC=$CC
|
||||
|
||||
|
||||
|
||||
-
|
||||
- vars="
|
||||
- ../compat/libjpeg/jcapimin.c ../compat/libjpeg/jcapistd.c ../compat/libjpeg/jccoefct.c
|
||||
- ../compat/libjpeg/jccolor.c ../compat/libjpeg/jcdctmgr.c ../compat/libjpeg/jchuff.c
|
||||
- ../compat/libjpeg/jcinit.c ../compat/libjpeg/jcmainct.c ../compat/libjpeg/jcmarker.c
|
||||
- ../compat/libjpeg/jcmaster.c ../compat/libjpeg/jcomapi.c ../compat/libjpeg/jcparam.c
|
||||
- ../compat/libjpeg/jcarith.c ../compat/libjpeg/jcprepct.c ../compat/libjpeg/jcsample.c
|
||||
- ../compat/libjpeg/jctrans.c ../compat/libjpeg/jdapimin.c ../compat/libjpeg/jdapistd.c
|
||||
- ../compat/libjpeg/jdatadst.c ../compat/libjpeg/jdatasrc.c ../compat/libjpeg/jdcoefct.c
|
||||
- ../compat/libjpeg/jdcolor.c ../compat/libjpeg/jddctmgr.c ../compat/libjpeg/jdhuff.c
|
||||
- ../compat/libjpeg/jdinput.c ../compat/libjpeg/jdmainct.c ../compat/libjpeg/jdmarker.c
|
||||
- ../compat/libjpeg/jdmaster.c ../compat/libjpeg/jdmerge.c ../compat/libjpeg/jdarith.c
|
||||
- ../compat/libjpeg/jdpostct.c ../compat/libjpeg/jdsample.c ../compat/libjpeg/jdtrans.c
|
||||
- ../compat/libjpeg/jerror.c ../compat/libjpeg/jfdctflt.c ../compat/libjpeg/jfdctfst.c
|
||||
- ../compat/libjpeg/jfdctint.c ../compat/libjpeg/jidctflt.c ../compat/libjpeg/jidctfst.c
|
||||
- ../compat/libjpeg/jidctint.c ../compat/libjpeg/jaricom.c ../compat/libjpeg/jquant1.c
|
||||
- ../compat/libjpeg/jquant2.c ../compat/libjpeg/jutils.c ../compat/libjpeg/jmemmgr.c
|
||||
- ../compat/libjpeg/jmemansi.c
|
||||
-"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
vars="jpegtcl.h jpegtclDecls.h"
|
||||
for i in $vars; do
|
||||
# check for existence, be strict because it is installed
|
||||
diff --git a/libjpeg/configure.ac b/libjpeg/configure.ac
|
||||
index 040b56f..604173a 100755
|
||||
--- a/libjpeg/configure.ac
|
||||
+++ b/libjpeg/configure.ac
|
||||
@@ -53,24 +53,6 @@ JPEG_CC=$CC
|
||||
|
||||
TEA_ADD_SOURCES([jpegtcl.c jpegtclStubInit.c])
|
||||
|
||||
-TEA_ADD_SOURCES([
|
||||
- ../compat/libjpeg/jcapimin.c ../compat/libjpeg/jcapistd.c ../compat/libjpeg/jccoefct.c
|
||||
- ../compat/libjpeg/jccolor.c ../compat/libjpeg/jcdctmgr.c ../compat/libjpeg/jchuff.c
|
||||
- ../compat/libjpeg/jcinit.c ../compat/libjpeg/jcmainct.c ../compat/libjpeg/jcmarker.c
|
||||
- ../compat/libjpeg/jcmaster.c ../compat/libjpeg/jcomapi.c ../compat/libjpeg/jcparam.c
|
||||
- ../compat/libjpeg/jcarith.c ../compat/libjpeg/jcprepct.c ../compat/libjpeg/jcsample.c
|
||||
- ../compat/libjpeg/jctrans.c ../compat/libjpeg/jdapimin.c ../compat/libjpeg/jdapistd.c
|
||||
- ../compat/libjpeg/jdatadst.c ../compat/libjpeg/jdatasrc.c ../compat/libjpeg/jdcoefct.c
|
||||
- ../compat/libjpeg/jdcolor.c ../compat/libjpeg/jddctmgr.c ../compat/libjpeg/jdhuff.c
|
||||
- ../compat/libjpeg/jdinput.c ../compat/libjpeg/jdmainct.c ../compat/libjpeg/jdmarker.c
|
||||
- ../compat/libjpeg/jdmaster.c ../compat/libjpeg/jdmerge.c ../compat/libjpeg/jdarith.c
|
||||
- ../compat/libjpeg/jdpostct.c ../compat/libjpeg/jdsample.c ../compat/libjpeg/jdtrans.c
|
||||
- ../compat/libjpeg/jerror.c ../compat/libjpeg/jfdctflt.c ../compat/libjpeg/jfdctfst.c
|
||||
- ../compat/libjpeg/jfdctint.c ../compat/libjpeg/jidctflt.c ../compat/libjpeg/jidctfst.c
|
||||
- ../compat/libjpeg/jidctint.c ../compat/libjpeg/jaricom.c ../compat/libjpeg/jquant1.c
|
||||
- ../compat/libjpeg/jquant2.c ../compat/libjpeg/jutils.c ../compat/libjpeg/jmemmgr.c
|
||||
- ../compat/libjpeg/jmemansi.c
|
||||
-])
|
||||
|
||||
TEA_ADD_HEADERS([jpegtcl.h jpegtclDecls.h])
|
||||
|
||||
diff --git a/libjpeg/jpegtclDecls.h b/libjpeg/jpegtclDecls.h
|
||||
index bd8decb..3367252 100755
|
||||
--- a/libjpeg/jpegtclDecls.h
|
||||
+++ b/libjpeg/jpegtclDecls.h
|
||||
@@ -30,8 +30,8 @@ EXTERN int Jpegtcl_SafeInit(Tcl_Interp *interp);
|
||||
|
||||
/* undef Tcl macros that conflict with libjpeg stuff (sigh) */
|
||||
#undef EXTERN
|
||||
-#include "../compat/libjpeg/jpeglib.h"
|
||||
-#include "../compat/libjpeg/jerror.h"
|
||||
+#include "/usr/include/jpeglib.h"
|
||||
+#include "/usr/include/jerror.h"
|
||||
|
||||
/* !BEGIN!: Do not edit below this line. */
|
||||
|
||||
diff --git a/libpng/Makefile.in b/libpng/Makefile.in
|
||||
index bdfb68f..6e84f5f 100755
|
||||
--- a/libpng/Makefile.in
|
||||
+++ b/libpng/Makefile.in
|
||||
@@ -153,9 +153,9 @@ DEFS = @DEFS@ $(PKG_CFLAGS)
|
||||
CONFIG_CLEAN_FILES = Makefile
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
-LIBS = @PKG_LIBS@ @LIBS@
|
||||
+LIBS = @PKG_LIBS@ @LIBS@ -lpng16
|
||||
AR = @AR@
|
||||
-CFLAGS = @CFLAGS@ -DPNG_IMPEXP=MODULE_SCOPE -DPNG_EXTERN=MODULE_SCOPE
|
||||
+CFLAGS = @CFLAGS@ -DPNG_IMPEXP= -DPNG_EXTERN=MODULE_SCOPE -DMODULE_SCOPE=extern
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
#========================================================================
|
||||
diff --git a/libpng/configure b/libpng/configure
|
||||
index 75cdff5..e35485e 100755
|
||||
--- a/libpng/configure
|
||||
+++ b/libpng/configure
|
||||
@@ -5449,49 +5449,6 @@ fi
|
||||
|
||||
|
||||
|
||||
-
|
||||
- vars="
|
||||
- ../compat/libpng/png.c ../compat/libpng/pngerror.c ../compat/libpng/pngmem.c
|
||||
- ../compat/libpng/pngpread.c ../compat/libpng/pngread.c ../compat/libpng/pngrio.c
|
||||
- ../compat/libpng/pngrtran.c ../compat/libpng/pngrutil.c ../compat/libpng/pngset.c
|
||||
- ../compat/libpng/pngtrans.c ../compat/libpng/pngwio.c ../compat/libpng/pngwrite.c
|
||||
- ../compat/libpng/pngwtran.c ../compat/libpng/pngwutil.c ../compat/libpng/pngget.c
|
||||
-"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
vars="pngtcl.h pngtclDecls.h"
|
||||
for i in $vars; do
|
||||
# check for existence, be strict because it is installed
|
||||
diff --git a/libpng/configure.ac b/libpng/configure.ac
|
||||
index e9a814f..17f38a3 100755
|
||||
--- a/libpng/configure.ac
|
||||
+++ b/libpng/configure.ac
|
||||
@@ -64,14 +64,6 @@ IMG_SRCPATH(zlibtcl)
|
||||
|
||||
TEA_ADD_SOURCES([pngtcl.c pngtclStubInit.c])
|
||||
|
||||
-TEA_ADD_SOURCES([
|
||||
- ../compat/libpng/png.c ../compat/libpng/pngerror.c ../compat/libpng/pngmem.c
|
||||
- ../compat/libpng/pngpread.c ../compat/libpng/pngread.c ../compat/libpng/pngrio.c
|
||||
- ../compat/libpng/pngrtran.c ../compat/libpng/pngrutil.c ../compat/libpng/pngset.c
|
||||
- ../compat/libpng/pngtrans.c ../compat/libpng/pngwio.c ../compat/libpng/pngwrite.c
|
||||
- ../compat/libpng/pngwtran.c ../compat/libpng/pngwutil.c ../compat/libpng/pngget.c
|
||||
-])
|
||||
-
|
||||
TEA_ADD_HEADERS([pngtcl.h pngtclDecls.h])
|
||||
TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${zlibtcl_SRC_PATH}`\"])
|
||||
TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${zlibtcl_BUILD_PATH}`\"])
|
||||
diff --git a/libpng/pngtclDecls.h b/libpng/pngtclDecls.h
|
||||
index 82eb8a4..d394525 100755
|
||||
--- a/libpng/pngtclDecls.h
|
||||
+++ b/libpng/pngtclDecls.h
|
||||
@@ -28,7 +28,9 @@
|
||||
EXTERN int Pngtcl_Init(Tcl_Interp *interp);
|
||||
EXTERN int Pngtcl_SafeInit(Tcl_Interp *interp);
|
||||
|
||||
-#include "../compat/libpng/png.h"
|
||||
+#undef PNG_IMPEXP
|
||||
+#include "/usr/include/png.h"
|
||||
+#define PNG_IMPEXP extern
|
||||
|
||||
/* !BEGIN!: Do not edit below this line. */
|
||||
|
||||
diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in
|
||||
index f6f2664..a0c7006 100755
|
||||
--- a/libtiff/Makefile.in
|
||||
+++ b/libtiff/Makefile.in
|
||||
@@ -151,9 +151,9 @@ DEFS = @DEFS@ $(PKG_CFLAGS)
|
||||
CONFIG_CLEAN_FILES = Makefile
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
-LIBS = @PKG_LIBS@ @LIBS@
|
||||
+LIBS = @PKG_LIBS@ @LIBS@ -ltiff
|
||||
AR = @AR@
|
||||
-CFLAGS = @CFLAGS@ -DTIFFTCLAPI=MODULE_SCOPE
|
||||
+CFLAGS = @CFLAGS@ -DTIFFTCLAPI=MODULE_SCOPE -DMODULE_SCOPE=extern
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
#========================================================================
|
||||
diff --git a/libtiff/configure b/libtiff/configure
|
||||
index 03551e3..6e16b5b 100755
|
||||
--- a/libtiff/configure
|
||||
+++ b/libtiff/configure
|
||||
@@ -5298,55 +5298,6 @@ mv -f tifftcl_confdefs.h confdefs.h
|
||||
|
||||
|
||||
|
||||
-
|
||||
- vars="
|
||||
- ../compat/libtiff/libtiff/tif_aux.c ../compat/libtiff/libtiff/tif_close.c ../compat/libtiff/libtiff/tif_codec.c
|
||||
- ../compat/libtiff/libtiff/tif_compress.c ../compat/libtiff/libtiff/tif_dir.c ../compat/libtiff/libtiff/tif_dirinfo.c
|
||||
- ../compat/libtiff/libtiff/tif_dirread.c ../compat/libtiff/libtiff/tif_dirwrite.c ../compat/libtiff/libtiff/tif_dumpmode.c
|
||||
- ../compat/libtiff/libtiff/tif_error.c ../compat/libtiff/libtiff/tif_fax3.c
|
||||
- ../compat/libtiff/libtiff/tif_getimage.c ../compat/libtiff/libtiff/tif_flush.c ../compat/libtiff/libtiff/tif_luv.c
|
||||
- ../compat/libtiff/libtiff/tif_lzw.c ../compat/libtiff/libtiff/tif_next.c ../compat/libtiff/libtiff/tif_open.c
|
||||
- ../compat/libtiff/libtiff/tif_packbits.c ../compat/libtiff/libtiff/tif_predict.c ../compat/libtiff/libtiff/tif_print.c
|
||||
- ../compat/libtiff/libtiff/tif_read.c ../compat/libtiff/libtiff/tif_swab.c ../compat/libtiff/libtiff/tif_strip.c
|
||||
- ../compat/libtiff/libtiff/tif_thunder.c ../compat/libtiff/libtiff/tif_tile.c ../compat/libtiff/libtiff/tif_version.c
|
||||
- ../compat/libtiff/libtiff/tif_warning.c ../compat/libtiff/libtiff/tif_write.c
|
||||
- ../compat/libtiff/libtiff/tif_color.c ../compat/libtiff/libtiff/tif_extension.c
|
||||
-"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
vars="tifftcl.h tifftclDecls.h"
|
||||
for i in $vars; do
|
||||
# check for existence, be strict because it is installed
|
||||
diff --git a/libtiff/configure.ac b/libtiff/configure.ac
|
||||
index aedb2ac..fef474d 100755
|
||||
--- a/libtiff/configure.ac
|
||||
+++ b/libtiff/configure.ac
|
||||
@@ -82,20 +82,6 @@ mv -f tifftcl_confdefs.h confdefs.h
|
||||
|
||||
TEA_ADD_SOURCES([tifftcl.c tifftclStubInit.c])
|
||||
|
||||
-TEA_ADD_SOURCES([
|
||||
- ../compat/libtiff/libtiff/tif_aux.c ../compat/libtiff/libtiff/tif_close.c ../compat/libtiff/libtiff/tif_codec.c
|
||||
- ../compat/libtiff/libtiff/tif_compress.c ../compat/libtiff/libtiff/tif_dir.c ../compat/libtiff/libtiff/tif_dirinfo.c
|
||||
- ../compat/libtiff/libtiff/tif_dirread.c ../compat/libtiff/libtiff/tif_dirwrite.c ../compat/libtiff/libtiff/tif_dumpmode.c
|
||||
- ../compat/libtiff/libtiff/tif_error.c ../compat/libtiff/libtiff/tif_fax3.c
|
||||
- ../compat/libtiff/libtiff/tif_getimage.c ../compat/libtiff/libtiff/tif_flush.c ../compat/libtiff/libtiff/tif_luv.c
|
||||
- ../compat/libtiff/libtiff/tif_lzw.c ../compat/libtiff/libtiff/tif_next.c ../compat/libtiff/libtiff/tif_open.c
|
||||
- ../compat/libtiff/libtiff/tif_packbits.c ../compat/libtiff/libtiff/tif_predict.c ../compat/libtiff/libtiff/tif_print.c
|
||||
- ../compat/libtiff/libtiff/tif_read.c ../compat/libtiff/libtiff/tif_swab.c ../compat/libtiff/libtiff/tif_strip.c
|
||||
- ../compat/libtiff/libtiff/tif_thunder.c ../compat/libtiff/libtiff/tif_tile.c ../compat/libtiff/libtiff/tif_version.c
|
||||
- ../compat/libtiff/libtiff/tif_warning.c ../compat/libtiff/libtiff/tif_write.c
|
||||
- ../compat/libtiff/libtiff/tif_color.c ../compat/libtiff/libtiff/tif_extension.c
|
||||
-])
|
||||
-
|
||||
TEA_ADD_HEADERS([tifftcl.h tifftclDecls.h])
|
||||
TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}`\"])
|
||||
TEA_ADD_INCLUDES([-I\"./libtiff\"])
|
||||
diff --git a/tiff/configure b/tiff/configure
|
||||
index bc6189b..b9d50e3 100755
|
||||
--- a/tiff/configure
|
||||
+++ b/tiff/configure
|
||||
@@ -6270,7 +6270,7 @@ fi
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
|
||||
- vars="tiff.c tiffJpeg.c tiffZip.c tiffPixar.c"
|
||||
+ vars="tiff.c"
|
||||
for i in $vars; do
|
||||
case $i in
|
||||
\$*)
|
||||
diff --git a/tiff/configure.ac b/tiff/configure.ac
|
||||
index 581908a..5ac8551 100755
|
||||
--- a/tiff/configure.ac
|
||||
+++ b/tiff/configure.ac
|
||||
@@ -75,7 +75,7 @@ IMG_SRCPATH(zlibtcl)
|
||||
# and PKG_TCL_SOURCES.
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
-TEA_ADD_SOURCES([tiff.c tiffJpeg.c tiffZip.c tiffPixar.c])
|
||||
+TEA_ADD_SOURCES([tiff.c])
|
||||
TEA_ADD_HEADERS([])
|
||||
TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}`\"])
|
||||
TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\"])
|
||||
diff --git a/tiff/tiff.c b/tiff/tiff.c
|
||||
index 69ab989..4a43bc9 100755
|
||||
--- a/tiff/tiff.c
|
||||
+++ b/tiff/tiff.c
|
||||
@@ -114,14 +114,10 @@ SetupTiffLibrary (Tcl_Interp *interp)
|
||||
if (Zlibtcl_InitStubs(interp, ZLIBTCL_VERSION, 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
- TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip);
|
||||
- TIFFRegisterCODEC (COMPRESSION_ADOBE_DEFLATE, "AdobeDeflate", TkimgTIFFInitZip);
|
||||
|
||||
if (Jpegtcl_InitStubs(interp, JPEGTCL_VERSION, 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
- TIFFRegisterCODEC (COMPRESSION_JPEG, "JPEG", TkimgTIFFInitJpeg);
|
||||
- TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TkimgTIFFInitPixar);
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
diff --git a/zlib/Makefile.in b/zlib/Makefile.in
|
||||
index e854470..5e16649 100755
|
||||
--- a/zlib/Makefile.in
|
||||
+++ b/zlib/Makefile.in
|
||||
@@ -149,9 +149,9 @@ DEFS = @DEFS@ $(PKG_CFLAGS)
|
||||
CONFIG_CLEAN_FILES = Makefile
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
-LIBS = @PKG_LIBS@ @LIBS@
|
||||
+LIBS = @PKG_LIBS@ @LIBS@ -lz
|
||||
AR = @AR@
|
||||
-CFLAGS = @CFLAGS@ -DZEXTERN=MODULE_SCOPE -DZLIB_CONST
|
||||
+CFLAGS = @CFLAGS@ -DZEXTERN=MODULE_SCOPE -DZLIB_CONST -DMODULE_SCOPE=extern
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
#========================================================================
|
||||
diff --git a/zlib/configure b/zlib/configure
|
||||
index c582ba1..e8bff1c 100755
|
||||
--- a/zlib/configure
|
||||
+++ b/zlib/configure
|
||||
@@ -5154,184 +5154,6 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
|
||||
done
|
||||
|
||||
|
||||
-
|
||||
-
|
||||
- vars="../compat/zlib/adler32.c ../compat/zlib/compress.c ../compat/zlib/crc32.c"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- vars="../compat/zlib/deflate.c ../compat/zlib/gzclose.c ../compat/zlib/gzlib.c"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- vars="../compat/zlib/gzread.c ../compat/zlib/gzwrite.c ../compat/zlib/infback.c"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- vars="../compat/zlib/inffast.c ../compat/zlib/inflate.c ../compat/zlib/inftrees.c"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- vars="../compat/zlib/trees.c ../compat/zlib/uncompr.c ../compat/zlib/zutil.c"
|
||||
- for i in $vars; do
|
||||
- case $i in
|
||||
- \$*)
|
||||
- # allow $-var names
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $i"
|
||||
- ;;
|
||||
- *)
|
||||
- # check for existence - allows for generic/win/unix VPATH
|
||||
- # To add more dirs here (like 'src'), you have to update VPATH
|
||||
- # in Makefile.in as well
|
||||
- if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
|
||||
- -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
|
||||
- -a ! -f "${srcdir}/macosx/$i" \
|
||||
- ; then
|
||||
- as_fn_error $? "could not find source file '$i'" "$LINENO" 5
|
||||
- fi
|
||||
- PKG_SOURCES="$PKG_SOURCES $i"
|
||||
- # this assumes it is in a VPATH dir
|
||||
- i=`basename $i`
|
||||
- # handle user calling this before or after TEA_SETUP_COMPILER
|
||||
- if test x"${OBJEXT}" != x ; then
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
|
||||
- else
|
||||
- j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
|
||||
- fi
|
||||
- PKG_OBJECTS="$PKG_OBJECTS $j"
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
vars="zlibtcl.h zlibtclDecls.h"
|
||||
for i in $vars; do
|
||||
# check for existence, be strict because it is installed
|
||||
diff --git a/zlib/configure.ac b/zlib/configure.ac
|
||||
index bbc639c..c8c3868 100755
|
||||
--- a/zlib/configure.ac
|
||||
+++ b/zlib/configure.ac
|
||||
@@ -50,11 +50,6 @@ TEA_SETUP_COMPILER
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
TEA_ADD_SOURCES([zlibtcl.c zlibtclStubInit.c])
|
||||
-TEA_ADD_SOURCES([../compat/zlib/adler32.c ../compat/zlib/compress.c ../compat/zlib/crc32.c])
|
||||
-TEA_ADD_SOURCES([../compat/zlib/deflate.c ../compat/zlib/gzclose.c ../compat/zlib/gzlib.c])
|
||||
-TEA_ADD_SOURCES([../compat/zlib/gzread.c ../compat/zlib/gzwrite.c ../compat/zlib/infback.c])
|
||||
-TEA_ADD_SOURCES([../compat/zlib/inffast.c ../compat/zlib/inflate.c ../compat/zlib/inftrees.c])
|
||||
-TEA_ADD_SOURCES([../compat/zlib/trees.c ../compat/zlib/uncompr.c ../compat/zlib/zutil.c])
|
||||
|
||||
TEA_ADD_HEADERS([zlibtcl.h zlibtclDecls.h])
|
||||
|
||||
diff --git a/zlib/zlibtclDecls.h b/zlib/zlibtclDecls.h
|
||||
index c2ebb63..0e75133 100755
|
||||
--- a/zlib/zlibtclDecls.h
|
||||
+++ b/zlib/zlibtclDecls.h
|
||||
@@ -28,7 +28,7 @@
|
||||
EXTERN int Zlibtcl_Init(Tcl_Interp *interp);
|
||||
EXTERN int Zlibtcl_SafeInit(Tcl_Interp *interp);
|
||||
|
||||
-#include "../compat/zlib/zlib.h"
|
||||
+#include "/usr/include/zlib.h"
|
||||
|
||||
#undef gzgetc /* Became a macro in zlib 1.2.7 */
|
||||
|
||||
Reference in New Issue
Block a user