Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2002 10:24:28 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        walt <wsheets@sbcglobal.net>, freebsd-ports@freebsd.org, Bill Fenner <fenner@freebsd.org>
Subject:   Re: Png-1.2.2_1 broken on -CURRENT?
Message-ID:  <20020517072428.GA75925@sunbay.com>
In-Reply-To: <20020516235508.GA9554@nagual.pp.ru>
References:  <3CE1B2EA.1000900@sbcglobal.net> <20020516235508.GA9554@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 17, 2002 at 03:55:10AM +0400, Andrey A. Chernov wrote:
> On Tue, May 14, 2002 at 17:59:22 -0700, walt wrote:
> > The "make install" fails for png-1.2.2_1 after a successful "make":
> > install -o  -g  -m  png.h  pngconf.h  /usr/local/include/libpng
> > install: invalid file mode:  png.h
> >=20
> > Well you can bet your bippy it's invalid--there's no filemode specified,
> > or group or owner either.
> >=20
> > In fact, the environment variables in this line from the makefile never
> > get properly substituted:
> >=20
> > ${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE}
>=20
> Ruslan (CC'ed) broke <bsd.own.mk> where INCOWN, INCGRP and INCMODE
> was traditionally defined. Ruslan, please fix it.
>=20
I don't think that calling the 2000/01/14 - 2002/05/12 a "tradition"
is quite right (these INC*s were added only in bsd.own.mk,v 1.27 and
are unique to FreeBSD).

When I asked on ports@ some time ago how many ports use bsd.*.mk files,
I was told (Bill, was it you?) that less than 2% of ports use them, and
I should not be too much worried if some of them break due to my work
of the new generation of bsd.*.mk files for FreeBSD.  Instead, the
relevant ports could easily be fixed.

For this particular port, it uses the makefile.freebsd specially
targeted to FreeBSD.  Why not just use the bsd.lib.mk for it?

%%%
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/ports/graphics/png/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- Makefile	30 Apr 2002 15:29:08 -0000	1.48
+++ Makefile	17 May 2002 07:21:18 -0000
@@ -29,11 +29,15 @@
=20
 MAN3=3D		libpng.3 libpngpf.3
 MAN5=3D		png.5
+MANCOMPRESSED=3D	maybe
=20
 .include <bsd.port.pre.mk>
=20
 post-extract:
 # Please don't delete the following line - this link used by ghostscript* =
ports
 	@${LN} -sf ${WRKSRC} ${WRKDIR}/libpng
+
+pre-install:
+	@[ -d ${PREFIX}/include/libpng ] || ${MKDIR} ${PREFIX}/include/libpng
=20
 .include <bsd.port.post.mk>
Index: files/patch-aa
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/ports/graphics/png/files/patch-aa,v
retrieving revision 1.18
diff -u -r1.18 patch-aa
--- files/patch-aa	21 Apr 2002 16:11:52 -0000	1.18
+++ files/patch-aa	17 May 2002 07:21:18 -0000
@@ -1,37 +1,116 @@
---- scripts/makefile.freebsd.orig	Mon Apr 15 18:11:36 2002
-+++ scripts/makefile.freebsd	Sun Apr 21 20:03:05 2002
-@@ -3,11 +3,13 @@
+--- scripts/makefile.freebsd.orig	Mon Apr 15 17:11:36 2002
++++ scripts/makefile.freebsd	Fri May 17 10:14:05 2002
+@@ -3,91 +3,41 @@
  # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  # For conditions of distribution and use, see copyright notice in png.h
 =20
-+.include <bsd.own.mk>
-+
- # where make install puts libpng.a and png.h
+-# where make install puts libpng.a and png.h
 -prefix=3D/usr/local
-+prefix=3D${PREFIX}
++LIB=3D		png
++SHLIB_MAJOR=3D	${SHLIB_VER}
++SHLIB_MINOR=3D	0
++NOPROFILE=3D	YES
 =20
 -PNGMAJ=3D 5
 -.if (${OBJFORMAT} =3D=3D "elf")
-+PNGMAJ=3D $(SHLIB_VER)
-+.if (${PORTOBJFORMAT} =3D=3D "elf")
- PNGVER=3D $(PNGMAJ)
- .else
- PNGMIN=3D 0
-@@ -15,7 +17,7 @@
- .endif
+-PNGVER=3D $(PNGMAJ)
+-.else
+-PNGMIN=3D 0
+-PNGVER=3D $(PNGMAJ).$(PNGMIN)
+-.endif
++# where make install puts libpng.a and png.h
++DESTDIR=3D	${PREFIX}
++LIBDIR=3D		/lib
++INCS=3D		png.h pngconf.h
++INCSDIR=3D	/include/libpng
++INCDIR=3D		${INCSDIR}		# for 4.x bsd.lib.mk
++MAN=3D		libpng.3 libpngpf.3 png.5
++MANDIR=3D		/man/man
++SYMLINKS=3D	libpng/png.h ${INCSDIR}/png.h \
++		libpng/pngconf.h ${INCSDIR}/pngconf.h
 =20
  CFLAGS+=3D -I. -DPNG_USE_PNGGCCRD
 -.if (${MACHINE_ARCH} !=3D "i386")
 +.if (${ARCH} !=3D "i386")
  CFLAGS+=3D -DPNG_NO_ASSEMBLER_CODE
  .endif
- LDFLAGS+=3D-L. -lpng -lz -lm -static
-@@ -36,7 +38,7 @@
- 	$(RANLIB) $@
+-LDFLAGS+=3D-L. -lpng -lz -lm -static
+-
+-OBJS =3D png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+-	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+-	pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
+-
+-.SUFFIXES: .c .so .o
+-
+-.c.so:
+-	${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $<
+-
+-all: libpng.a libpng.so.${PNGVER} pngtest
 =20
- libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
+-libpng.a: $(OBJS)
+-	ar rc $@  $(OBJS)
+-	$(RANLIB) $@
+-
+-libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
 -.if (${OBJFORMAT} =3D=3D "elf")
-+.if (${PORTOBJFORMAT} =3D=3D "elf")
- 	${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
- .else
- 	${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
+-	${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
+-.else
+-	${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
+-.endif
++SRCS=3D	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
++	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
++	pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c
+=20
+ pngtest: pngtest.o libpng.a
+-	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
++	${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
++
++CLEANFILES=3D pngtest pngtest.o pngout.png
+=20
+ test: pngtest
+ 	./pngtest
+=20
+-install: libpng.a libpng.so.${PNGVER}
+-	-@mkdir $(prefix)/include/libpng
+-	${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
+-		png.h pngconf.h $(prefix)/include/libpng
+-	ln -sf libpng/png.h $(prefix)/include/png.h
+-	ln -sf libpng/pngconf.h $(prefix)/include/pngconf.h
+-	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+-		libpng.a libpng.so.${PNGVER} $(prefix)/lib
+-	$(RANLIB) $(prefix)/lib/libpng.a
+-	ln -sf libpng.so.${PNGVER} $(prefix)/lib/libpng.so
+-	/sbin/ldconfig -R
+-	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+-		libpng.3 libpngpf.3 $(prefix)/man/man3
+-	${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
+-		png.5 $(prefix)/man/man5
+-
+-clean:
+-	rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
+-
+ DOCS =3D ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+ writelock:
+ 	chmod a-w *.[ch35] $(DOCS) scripts/*
+=20
+-# DO NOT DELETE THIS LINE -- make depend depends on it.
+-
+-png.o: png.h pngconf.h
+-pngerror.o: png.h pngconf.h
+-pngrio.o: png.h pngconf.h
+-pngwio.o: png.h pngconf.h
+-pngmem.o: png.h pngconf.h
+-pngset.o: png.h pngconf.h
+-pngget.o: png.h pngconf.h
+-pngread.o: png.h pngconf.h
+-pngrtran.o: png.h pngconf.h
+-pngrutil.o: png.h pngconf.h
+-pngtest.o: png.h pngconf.h
+-pngtrans.o: png.h pngconf.h
+-pngwrite.o: png.h pngconf.h
+-pngwtran.o: png.h pngconf.h
+-pngwutil.o: png.h pngconf.h
+-pngpread.o: png.h pngconf.h
+-pnggccrd.o: png.h pngconf.h
+-
++.include <bsd.lib.mk>
%%%

This has been verified to work for both 4.x and 5.0.


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--bg08WKrSYDhXBjb5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE85LAsUkv4P6juNwoRAmjSAJ9KCCEly/7dufEdVtSn0pm5oW4wYgCcD237
bDwsgQey4j0KuoX0eceWQiA=
=z65e
-----END PGP SIGNATURE-----

--bg08WKrSYDhXBjb5--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020517072428.GA75925>