mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
96a7ab194f
Submitted by: "John E. Hein" <jhein@timing.com> PR: 91610
57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
--- scripts/makefile.freebsd.orig Sat May 18 08:46:45 2002
|
|
+++ scripts/makefile.freebsd Tue Jan 10 12:05:18 2006
|
|
@@ -12,22 +12,22 @@
|
|
NOOBJ= YES
|
|
|
|
# where make install puts libpng.a and png.h
|
|
-DESTDIR= ${PREFIX}
|
|
-LIBDIR= /lib
|
|
+LIBDIR= ${PREFIX}/lib
|
|
INCS= png.h pngconf.h
|
|
-INCSDIR= /include/libpng
|
|
+INCSDIR= ${PREFIX}/include/libpng
|
|
INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
|
|
MAN= libpng.3 libpngpf.3 png.5
|
|
-MANDIR= /man/man
|
|
+MANDIR= ${PREFIX}/man/man
|
|
SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
|
libpng/pngconf.h ${INCSDIR}/../pngconf.h
|
|
LDADD+= -lm -lz
|
|
DPADD+= ${LIBM} ${LIBZ}
|
|
|
|
-CFLAGS+= -I. -DPNG_USE_PNGGCCRD
|
|
-.if (${MACHINE_ARCH} != "i386")
|
|
-CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
|
|
+cppflags=-DPNG_USE_PNGGCCRD
|
|
+.if (${ARCH} != "i386")
|
|
+cppflags+=-DPNG_NO_ASSEMBLER_CODE
|
|
.endif
|
|
+CFLAGS+=-I. ${cppflags}
|
|
|
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
|
@@ -44,5 +44,23 @@
|
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
|
writelock:
|
|
chmod a-w *.[ch35] $(DOCS) scripts/*
|
|
+
|
|
+libpng-config:
|
|
+ ( cat scripts/libpng-config-head.in; \
|
|
+ echo prefix=\"${PREFIX}\"; \
|
|
+ echo libdir=\"${PREFIX}${LIBDIR}\"; \
|
|
+ echo ccopts=\"${ccopts}\"; \
|
|
+ echo cppflags=\"${cppflags}\"; \
|
|
+ echo I_opts=\"-I${PREFIX}${INCSDIR}\"; \
|
|
+ echo L_opts=\"-L${PREFIX}${LIBDIR}\"; \
|
|
+ echo libs=\"-lpng -lz -lm\"; \
|
|
+ echo ldopts=\"${ldopts}\"; \
|
|
+ cat scripts/libpng-config-body.in ) > libpng-config
|
|
+ chmod +x libpng-config
|
|
+
|
|
+beforeinstall: libpng-config
|
|
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
+ libpng-config ${PREFIX}/bin
|
|
+ ln -sf libpng-config ${PREFIX}/bin/libpng12-config
|
|
|
|
.include <bsd.lib.mk>
|