View | Details | Raw Unified | Return to bug 142575
Collapse All | Expand All

(-)/usr/ports/sunpoet/png/Makefile (-2 / +2 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	png
8
PORTNAME=	png
9
PORTVERSION=	1.2.40
9
PORTVERSION=	1.2.42
10
CATEGORIES=	graphics
10
CATEGORIES=	graphics
11
MASTER_SITES=	SF/lib${PORTNAME}/00-lib${PORTNAME}-stable/${PORTVERSION}
11
MASTER_SITES=	SF/lib${PORTNAME}/00-lib${PORTNAME}-stable/${PORTVERSION}
12
DISTNAME=	lib${PORTNAME}-${PORTVERSION}
12
DISTNAME=	lib${PORTNAME}-${PORTVERSION}
Lines 15-21 Link Here
15
#PATCHFILES=
15
#PATCHFILES=
16
#PATCH_DIST_STRIP= -p1
16
#PATCH_DIST_STRIP= -p1
17
17
18
MAINTAINER=	ports@FreeBSD.org
18
MAINTAINER=	sunpoet@sunpoet.net
19
COMMENT=	Library for manipulating PNG images
19
COMMENT=	Library for manipulating PNG images
20
20
21
MAKEFILE=	${WRKSRC}/scripts/makefile.freebsd
21
MAKEFILE=	${WRKSRC}/scripts/makefile.freebsd
(-)/usr/ports/sunpoet/png/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (libpng-1.2.40.tar.bz2) = 29bbd1c3cbe54b04bfc2bda43067ccb5
1
MD5 (libpng-1.2.42.tar.bz2) = 9a5cbe9798927fdf528f3186a8840ebe
2
SHA256 (libpng-1.2.40.tar.bz2) = a6197352ad5b79a9a1ce0dd59f5e737cfbf909e0f3c5f64631cf0d93549e4e40
2
SHA256 (libpng-1.2.42.tar.bz2) = a044c4632a236bbf99527da81977577929a173c1f7f68a70a81ea2ea7cffa6a7
3
SIZE (libpng-1.2.40.tar.bz2) = 629950
3
SIZE (libpng-1.2.42.tar.bz2) = 670811
(-)/usr/ports/sunpoet/png/files/patch-aa (-61 lines)
Lines 1-61 Link Here
1
--- scripts/makefile.freebsd.orig	2007-06-21 02:10:26.000000000 +0400
2
+++ scripts/makefile.freebsd	2007-10-13 17:24:24.000000000 +0400
3
@@ -8,26 +8,27 @@
4
 LIB=		png
5
 SHLIB_MAJOR=	${SHLIB_VER}
6
 SHLIB_MINOR=	0
7
-NOPROFILE=	YES
8
+.if (${OSVERSION} > 600007)
9
+NO_PROFILE=     YES
10
+NO_OBJ=         YES
11
+.else
12
+NOPROFILE=      YES
13
 NOOBJ=          YES
14
+.endif
15
 
16
 # where make install puts libpng.a and png.h
17
-DESTDIR=	${PREFIX}
18
-LIBDIR=		/lib
19
+LIBDIR=         ${PREFIX}/lib
20
 INCS=		png.h pngconf.h
21
-INCSDIR=	/include/libpng
22
+INCSDIR=        ${PREFIX}/include/libpng
23
 INCDIR=		${INCSDIR}		# for 4.x bsd.lib.mk
24
 MAN=		libpng.3 libpngpf.3 png.5
25
-MANDIR=		/man/man
26
+MANDIR=         ${PREFIX}/man/man
27
 SYMLINKS=       libpng/png.h ${INCSDIR}/../png.h \
28
 		libpng/pngconf.h ${INCSDIR}/../pngconf.h
29
 LDADD+=         -lm -lz
30
 DPADD+=         ${LIBM} ${LIBZ}
31
 
32
 CFLAGS+= -I.
33
-.if (${MACHINE_ARCH} != "i386")
34
-CFLAGS+= -DPNG_NO_MMX_CODE
35
-.endif
36
 
37
 SRCS=	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
38
 	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
39
@@ -45,4 +46,22 @@
40
 writelock:
41
 	chmod a-w *.[ch35] $(DOCS) scripts/*
42
 
43
+libpng-config:
44
+	( cat scripts/libpng-config-head.in; \
45
+	echo prefix=\"${PREFIX}\"; \
46
+	echo libdir=\"${LIBDIR}\"; \
47
+	echo ccopts=\"${ccopts}\"; \
48
+	echo cppflags=\"${cppflags}\"; \
49
+	echo I_opts=\"-I${INCSDIR}\"; \
50
+	echo L_opts=\"-L${LIBDIR}\"; \
51
+	echo libs=\"-lpng -lz -lm\"; \
52
+	echo ldopts=\"${ldopts}\"; \
53
+	cat scripts/libpng-config-body.in ) > libpng-config
54
+	chmod +x libpng-config
55
+
56
+beforeinstall: libpng-config
57
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
58
+		libpng-config ${PREFIX}/bin
59
+	ln -sf libpng-config ${PREFIX}/bin/libpng12-config
60
+
61
 .include <bsd.lib.mk>
(-)/usr/ports/sunpoet/png/files/patch-ab (-18 lines)
Lines 1-18 Link Here
1
--- scripts/libpng.pc.in.orig	Wed Jun 28 00:22:40 2006
2
+++ scripts/libpng.pc.in	Sun Jul 23 10:56:25 2006
3
@@ -1,10 +1,10 @@
4
-prefix=@prefix@
5
-exec_prefix=@exec_prefix@
6
-libdir=@libdir@
7
-includedir=@includedir@/libpng12
8
+prefix=@PREFIX@
9
+exec_prefix=${prefix}
10
+libdir=${exec_prefix}/lib
11
+includedir=${prefix}/include
12
 
13
 Name: libpng
14
 Description: Loads and saves PNG files
15
 Version: 1.2.40
16
-Libs: -L${libdir} -lpng12
17
+Libs: -L${libdir} -lpng -lz -lm
18
 Cflags: -I${includedir}
(-)/usr/ports/sunpoet/png/files/patch-ac (-16 lines)
Lines 1-16 Link Here
1
--- scripts/libpng-config-body.in.orig	Wed Sep 18 08:05:43 2002
2
+++ scripts/libpng-config-body.in	Sun Jul 23 10:27:47 2006
3
@@ -77,8 +77,12 @@
4
         echo ${R_opts}
5
         ;;
6
 
7
+    --ldopts)
8
+        echo ${ldopts}
9
+        ;;
10
+
11
     --ldflags)
12
-        echo ${ldflags} ${L_opts} ${R_opts} ${libs}
13
+        echo ${ldopts} ${L_opts} ${R_opts} ${libs}
14
         ;;
15
 
16
     --static)
(-)/usr/ports/sunpoet/png/files/patch-ad (-11 lines)
Lines 1-11 Link Here
1
--- pngconf.h.orig	2007-10-04 15:53:09.000000000 +0400
2
+++ pngconf.h	2007-10-13 17:31:06.000000000 +0400
3
@@ -737,7 +737,7 @@
4
 #  endif
5
 #endif
6
 
7
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
8
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) && defined(__i386__)
9
 #  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
10
 #    define PNG_ASSEMBLER_CODE_SUPPORTED
11
 #  endif
(-)/usr/ports/sunpoet/png/files/patch-pngconf.h (+11 lines)
Line 0 Link Here
1
--- pngconf.h.orig	2010-01-03 13:04:19.000000000 +0800
2
+++ pngconf.h	2010-01-10 23:03:36.000000000 +0800
3
@@ -804,7 +804,7 @@
4
 #  endif
5
 #endif
6
 
7
-#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
8
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) && defined(__i386__)
9
 #  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
10
 #    define PNG_ASSEMBLER_CODE_SUPPORTED
11
 #  endif
(-)/usr/ports/sunpoet/png/files/patch-scripts-libpng-config-body.in (+16 lines)
Line 0 Link Here
1
--- scripts/libpng-config-body.in.orig	2002-09-18 12:05:43.000000000 +0800
2
+++ scripts/libpng-config-body.in	2010-01-10 23:05:37.000000000 +0800
3
@@ -77,8 +77,12 @@
4
         echo ${R_opts}
5
         ;;
6
 
7
+    --ldopts)
8
+        echo ${ldopts}
9
+        ;;
10
+
11
     --ldflags)
12
-        echo ${ldflags} ${L_opts} ${R_opts} ${libs}
13
+        echo ${ldopts} ${L_opts} ${R_opts} ${libs}
14
         ;;
15
 
16
     --static)
(-)/usr/ports/sunpoet/png/files/patch-scripts-libpng.pc.in (+18 lines)
Line 0 Link Here
1
--- scripts/libpng.pc.in.orig	2010-01-03 13:04:21.000000000 +0800
2
+++ scripts/libpng.pc.in	2010-01-10 23:07:15.000000000 +0800
3
@@ -1,10 +1,10 @@
4
-prefix=@prefix@
5
-exec_prefix=@exec_prefix@
6
-libdir=@libdir@
7
-includedir=@includedir@/libpng12
8
+prefix=@PREFIX@
9
+exec_prefix=${prefix}
10
+libdir=${exec_prefix}/lib
11
+includedir=${prefix}/include
12
 
13
 Name: libpng
14
 Description: Loads and saves PNG files
15
 Version: 1.2.42
16
-Libs: -L${libdir} -lpng12
17
+Libs: -L${libdir} -lpng -lz -lm
18
 Cflags: -I${includedir}
(-)/usr/ports/sunpoet/png/files/patch-scripts-makefile.freebsd (+51 lines)
Line 0 Link Here
1
--- scripts/makefile.freebsd.orig	2010-01-03 13:04:21.000000000 +0800
2
+++ scripts/makefile.freebsd	2010-01-11 00:22:11.000000000 +0800
3
@@ -11,17 +11,21 @@
4
 LIB=		png
5
 SHLIB_MAJOR=	${SHLIB_VER}
6
 SHLIB_MINOR=	0
7
+.if (${OSVERSION} > 600007)
8
+NO_PROFILE=	YES
9
+NO_OBJ=		YES
10
+.else
11
 NOPROFILE=	YES
12
 NOOBJ=          YES
13
+.endif
14
 
15
 # where make install puts libpng.a and png.h
16
-DESTDIR=	${PREFIX}
17
-LIBDIR=		/lib
18
+LIBDIR=		${PREFIX}/lib
19
 INCS=		png.h pngconf.h
20
-INCSDIR=	/include/libpng
21
+INCSDIR=	${PREFIX}/include/libpng
22
 INCDIR=		${INCSDIR}		# for 4.x bsd.lib.mk
23
 MAN=		libpng.3 libpngpf.3 png.5
24
-MANDIR=		/man/man
25
+MANDIR=		${PREFIX}/man/man
26
 SYMLINKS=       libpng/png.h ${INCSDIR}/../png.h \
27
 		libpng/pngconf.h ${INCSDIR}/../pngconf.h
28
 LDADD+=         -lm -lz
29
@@ -48,4 +52,22 @@
30
 writelock:
31
 	chmod a-w *.[ch35] $(DOCS) scripts/*
32
 
33
+libpng-config:
34
+	( cat scripts/libpng-config-head.in; \
35
+	echo prefix=\"${PREFIX}\"; \
36
+	echo libdir=\"${LIBDIR}\"; \
37
+	echo ccopts=\"${ccopts}\"; \
38
+	echo cppflags=\"${cppflags}\"; \
39
+	echo I_opts=\"-I${INCSDIR}\"; \
40
+	echo L_opts=\"-L${LIBDIR}\"; \
41
+	echo libs=\"-lpng -lz -lm\"; \
42
+	echo ldopts=\"${ldopts}\"; \
43
+	cat scripts/libpng-config-body.in ) > libpng-config
44
+	chmod +x libpng-config
45
+
46
+beforeinstall: libpng-config
47
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
48
+		libpng-config ${PREFIX}/bin
49
+	ln -sf libpng-config ${PREFIX}/bin/libpng12-config
50
+
51
 .include <bsd.lib.mk>

Return to bug 142575