File: libpng.diff

package info (click to toggle)
libtk-img 1%3A1.4.13%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 37,792 kB
  • sloc: ansic: 202,225; sh: 14,946; tcl: 7,131; asm: 3,560; makefile: 2,137; cpp: 1,935; ada: 1,681; pascal: 1,139; cs: 879; awk: 782; perl: 104; xml: 95
file content (101 lines) | stat: -rw-r--r-- 3,388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Author: Sergei Golovan
Description: Patch allows one to build libtk-img using the system-wide libpng.
 The patch is a Debian-specific hack and isn't supposed to be forwarded upstream.
Last-modified: Wed, 31 Jan 2018 11:42:36 +0300

--- a/libpng/configure
+++ b/libpng/configure
@@ -5449,49 +5449,6 @@
 
 
 
-
-    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
--- a/libpng/configure.ac
+++ b/libpng/configure.ac
@@ -64,14 +64,6 @@
 
 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}`\"])
--- a/libpng/Makefile.in
+++ b/libpng/Makefile.in
@@ -153,9 +153,9 @@
 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)
 
 #========================================================================
--- 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. */