Bug 74647 - fix lang/php4 configure to detect various crypt()s on 64-bit platforms
Summary: fix lang/php4 configure to detect various crypt()s on 64-bit platforms
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-03 12:40 UTC by Anton Berezin
Modified: 2005-03-12 20:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Berezin freebsd_committer 2004-12-03 12:40:28 UTC
The configure script fails to detect various crypt()-related
functionality (DES/MD5/Blowfish) on amd64 platform.

Fix: 

This is needed since without having HAVE_CRYPT_H replaced with
HAVE_UNISTD_H, unistd.h is never included in those pieces of configure
that originally try to include crypt.h.  This goes unnoticed on 32-bit
platforms, since sizeof(int) == sizeof(char *), but leads to a coredump
on 64-bit platforms (well, at least on amd64) when crypt() is implicitly
defined and assumes an int return argument.--A5GgtfAlHbI16sH8CT1sOokQ8xG0ddtpvFFmonOKdzub5Gnb
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig	Tue Nov 30 22:14:27 2004
+++ Makefile	Tue Nov 30 22:14:51 2004
@@ -164,6 +164,7 @@ post-patch:
 	@${TOUCH} ${WRKSRC}/ext/php_config.h
 	@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
 	@${REINPLACE_CMD} "s|<crypt.h>|<unistd.h>|g" ${WRKSRC}/configure
+	@${REINPLACE_CMD} "s|HAVE_CRYPT_H|HAVE_UNISTD_H|g" ${WRKSRC}/configure
 
 .if ${PHP_SAPI} == "full"
 pre-configure:
How-To-Repeat: Build lang/php4 on an amd64 system, observe configure output.
Comment 1 Anton Berezin freebsd_committer 2004-12-03 12:51:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 2 Alex Dupre freebsd_committer 2004-12-03 13:20:04 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 bsdunx 2005-03-04 00:23:40 UTC
This port is still broken.

Needs following patch:

--- Makefile.orig       Thu Mar  3 19:21:40 2005
+++ Makefile    Thu Mar  3 19:20:23 2005
@@ -168,6 +168,9 @@
 post-patch:
        @${TOUCH} ${WRKSRC}/ext/php_config.h
        @${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|"
${WRKSRC}/php.ini-*
+       @${REINPLACE_CMD} \
+               "s|<crypt.h>|<unistd.h>|g;s|HAVE_CRYPT_H|HAVE_UNISTD_H|
g" \
+               ${WRKSRC}/configure

 .if ${PHP_SAPI} == "full"
 pre-configure:


-- 
Adam Gregoire <bsdunx@gmail.com>
Comment 4 Adam Gregoire 2005-03-12 02:04:21 UTC
This port is still broken.

Needs following patch:

--- Makefile.orig       Thu Mar  3 19:21:40 2005
+++ Makefile    Thu Mar  3 19:20:23 2005
@@ -168,6 +168,9 @@
 post-patch:
 	@${TOUCH} ${WRKSRC}/ext/php_config.h
 	@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|"
${WRKSRC}/php.ini-*
+	@${REINPLACE_CMD} \
+		"s|<crypt.h>|<unistd.h>|g;s|HAVE_CRYPT_H|HAVE_UNISTD_H|
g" \
+		${WRKSRC}/configure

 .if ${PHP_SAPI} == "full"
 pre-configure: