Subject: pkg/17781: databases/postgresql-server Makefile fix for Solaris
To: None <gnats-bugs@gnats.netbsd.org>
From: None <julien.letessier@sun.com>
List: netbsd-bugs
Date: 07/31/2002 06:57:40
>Number:         17781
>Category:       pkg
>Synopsis:       databases/postgresql-server Makefile fix for Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 31 06:58:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julien T. Letessier
>Release:        Zoularis/Solaris8
>Organization:
Sun Labs Europe
>Environment:
SunOS mikdemia 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-Enterprise
>Description:
databases/postgresql-server suffers from a include clash: openssl and /usr/include/crypt.h both define a des_encrypt function (among others).
>How-To-Repeat:
Build postgresql under Zoularis/Solaris8
>Fix:
Dirty but efficient:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/postgresql-server/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	2002/04/04 07:41:05	1.19
+++ Makefile	2002/07/31 13:44:43
@@ -40,6 +40,15 @@
 
 DEINSTALL_EXTRA_TMPL=	${PKGDIR}/DEINSTALL
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+post-configure:
+	${ECHO} '#ifdef HAVE_CRYPT_H' >> ${WRKSRC}/src/include/pg_config.h ; \
+	${ECHO} '#undef HAVE_CRYPT_H' >> ${WRKSRC}/src/include/pg_config.h ; \
+	${ECHO} '#endif'              >> ${WRKSRC}/src/include/pg_config.h
+.endif
+
 do-build:
 .for DIR in ${DIRS_TO_BUILD}
 	cd ${WRKSRC}/${DIR} && ${SETENV} ${MAKE_ENV}			\

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