Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2004 17:14:15 +0400 (MSD)
From:      Konstantin Oznobihin <bork@rsu.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/69150: [patch] security/openssl installs .pc files in $(prefix)/lib
Message-ID:  <200407161314.i6GDEFF7072493@rocky.cc.rsu.ru>
Resent-Message-ID: <200407161320.i6GDKMGn018550@freefall.freebsd.org>

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

>Number:         69150
>Category:       ports
>Synopsis:       [patch] security/openssl installs .pc files in $(prefix)/lib
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 16 13:20:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Konstantin Oznobihin
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
Rostov State University
>Environment:
System: FreeBSD .cc.rsu.ru 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Fri Jul 2 20:10:08 MSD 2004 :/usr/obj/usr/src/sys/athlon-xp.HEAD.2004-06-08 i386


	
>Description:
	security/openssl installs it's .pc files in $(prefix)/lib, while FreeBSD
	hierarchy rules says that such files should go into libdata. pkgconfig
	was changed to comply with these rules so it can not find .pc files which does
	not reside in libdata.
>How-To-Repeat:
	cd /usr/ports/security/openssl
	make install
	pkg-config openssl
>Fix:
	Changed Makefile.org to use libdata (patch also contains existing changes
	from security/openssl/files/patch-Makefile.org) and fixed
	security/openssl/pkg-plist accordingly

--- patch-Makefile.org begins here ---
--- Makefile.org.orig   Fri Jul 16 13:08:08 2004
+++ Makefile.org        Fri Jul 16 13:11:04 2004
@@ -191,7 +191,7 @@
 MAKEFILE= Makefile.ssl
 MAKE=     make -f Makefile.ssl
        
-MANDIR=$(OPENSSLDIR)/man
+MANDIR=$(MANPREFIX)/man
 MAN1=1
 MAN3=3
 MANSUFFIX=
@@ -275,6 +275,21 @@

 build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
                
+freebsd-shared:
+       for i in ${SHLIBDIRS}; do \
+       rm -f lib$$i.a lib$$i.so \
+               lib$$i.so.${SHLIBVER}; \
+       ${MAKE} CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='-fPIC ${CFLAG}' SDIRS='${SDIRS}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_AS
+       ( set -x; ${CC}  -nodefaultlibs -shared -o lib$$i.so.${SHLIBVER} \
+               -Wl,-S,-soname=lib$$i.so.${SHLIBVER} \
+               -Wl,${WHOLE_ARCHIVE_FLAG} lib$$i.a ) || exit 1; \
+       rm -f lib$$i.a; (cd $$i ; ${MAKE} clean) || exit 1 ;\
+       done;
+       @set -x; \
+       for i in ${SHLIBDIRS}; do \
+       ln -s lib$$i.so.${SHLIBVER} lib$$i.so; \
+       done;
+
 do_bsd-gcc-shared: do_gnu-shared
 do_linux-shared: do_gnu-shared
 do_gnu-shared:
@@ -596,7 +611,7 @@
        @false

 libclean:
-       rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
+       rm -f *.map *.So *.So.* engines/*.so *.a */lib */*/lib

 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
@@ -773,7 +788,7 @@
 install: all install_docs
        @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
                $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
-               $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
+               $(INSTALL_PREFIX)$(INSTALLTOP)/libdata/pkgconfig \
                $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
@@ -833,8 +848,8 @@
                        sed -e '1,/^$$/d' doc/openssl-shared.txt; \
                fi; \
        fi
-       cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
-       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
+       cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/libdata/pkgconfig
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/libdata/pkgconfig/openssl.pc

 install_docs:
        @$(PERL) $(TOP)/util/mkdir-p.pl \
--- patch-Makefile.org ends here ---

--- patch-pkg-plist begins here ---
--- pkg-plist.orig      Fri Jul 16 16:19:55 2004
+++ pkg-plist   Fri Jul 16 16:19:37 2004
@@ -71,7 +71,7 @@
 lib/libssl.a
 %%SHARED%%lib/libssl.so
 %%SHARED%%lib/libssl.so.%%SHLIBVER%%
-lib/pkgconfig/openssl.pc
+libdata/pkgconfig/openssl.pc
 %%NOBASE%%openssl/misc/CA.pl
 %%NOBASE%%openssl/misc/CA.sh
 %%NOBASE%%openssl/misc/c_hash
@@ -82,7 +82,7 @@
 %%NOBASE%%openssl/openssl.cnf.sample
 %%PORTDOCS%%%%DOCSDIR%%/openssl.txt
 @dirrm include/openssl
-@dirrm lib/pkgconfig
+@dirrm libdata/pkgconfig
 %%NOBASE%%@dirrm openssl/certs
 %%NOBASE%%@dirrm openssl/lib
 %%MANDIR%%@dirrm openssl/man/man1
--- patch-pkg-plist ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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