ports/75925: [patch] security/xca coerced into compiling on 5.3Rp2/i386

JP Dinger jpd at dsb.tudelft.nl
Fri Jan 7 18:20:14 UTC 2005


>Number:         75925
>Category:       ports
>Synopsis:       [patch] security/xca coerced into compiling on 5.3Rp2/i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 07 18:20:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     JP Dinger
>Release:        FreeBSD 5.3-RELEASE-p2 i386
>Organization:
unorganized
>Environment:
System: FreeBSD parnate 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #1: Sat Dec 11 13:25:12 CET 2004 root at parnate:/usr/obj/usr/src/sys/PARNATE i386


>Description:

xca doesn't compile out-of-the-tar on FreeBSD 5.3. I'm providing patches
to get it to compile anyway. I've used 0.5.1 instead of 0.4.5 for good
measure. It requires qt and db4; I have qt-3.3.3 and db4-4.0.14_1,1
installed. Note that I have _not_ tested if the port's Makefile is still
correct, I have only looked into xca and _its_ configuration and code.


>How-To-Repeat:
>Fix:

I have two patches, causing the compile to succeed and even the program
to run and generate keys and csrs. These are diffs against xca-0.5.1:

MD5 (xca-0.5.1.tar.gz) = 24e0289c189b8db2f1f15a4ddac1b1c3
SIZE (xca-0.5.1.tar.gz) = 287025


patch against the configure script:
- g++ conftest.c (containing c++ headers) is of course silly. s/\.c/&pp/g
- headers suffer from not being found, so I forced some -I... statements
  through the CF variable. There probably is a better way.
- this script fails miserably if it isn't compiled with -g. (why?)
- conftest.c(pp) gets an extra include to shut up the compiler.

--- xca-0.5.1/configure.orig	Thu Dec 16 15:27:44 2004
+++ xca-0.5.1/configure	Thu Dec 16 17:00:32 2004
@@ -27,7 +27,8 @@
 
 DIRS="$QTDIR $DIRS /usr /usr/X11R6 /usr/local"
 
-CF="-I. -I.."
+CF="-I. -I.. -I/usr/local/include -I/usr/X11R6/include"
+CFLAGS="-g"
 LIBS=-lstdc++
 LDIRS=
 MOC=moc
@@ -98,8 +99,8 @@
 search_includes db_cxx.h || err "The Berkeley DB header files were not found"
 search_lib db_cxx db4_cxx db_cxx-4 db3_cxx db_cxx-3 || err "The Berkeley DB library was not found. Try installing db-dev" 
 ## The fun of NPTL... (Thx Enrico Scholz)
-echo 'int main() {}' >conftest.c
-if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then
+echo 'int main() {}' >conftest.cpp
+if g++ $LIBS $LDIRS $CF $CFLAGS conftest.cpp -o conftest &>conftest.log; then
   :
 else
   search_lib pthread || err "Lib pthread needed for db_cxx and not found"
@@ -111,7 +112,7 @@
 search_lib qt qt-mt || err "The QT library was not found. Try installing qt-dev" 
 search_lib c_r || true
 # look if it compiles...
-if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then
+if g++ $LIBS $LDIRS $CF $CFLAGS conftest.cpp -o conftest &>conftest.log; then
   :
 else
   search_lib c_r || err "Libc_r needed for FreeBSD systems and was not found"
@@ -124,10 +125,11 @@
 
 export LD_LIBRARY_PATH
 ##### Try to compile them all together and show the versions.
-cat >conftest.c <<EOF
+cat >conftest.cpp <<EOF
 #include <openssl/opensslv.h>
 #include <db_cxx.h>
 #include <qglobal.h>
+#include <stdio.h>
 
 main(){
 printf("\nThe Versions of the used libraries are:\n\t%s\n\t%s\n\tQT: %s\n",
@@ -135,9 +137,9 @@
 }
 EOF
 
-if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log ; then
+if g++ $LIBS $LDIRS $CF $CFLAGS conftest.cpp -o conftest &>conftest.log ; then
   ./conftest ||err "Unable to execute a freshly compiled application, maybe you have to adjust your LD_LIBRARY_PATH or /etc/ld.so.conf"
-  #rm -f conftest.c conftest conftest.log
+  #rm -f conftest.cpp conftest conftest.log
 else
   err "Unable to compile a minimal application look at 'conftest.log' for errors"
 fi
*** end of patch

patch against widgets/clicklabel.cpp
- I don't understand the original.

--- xca-0.5.1/widgets/clicklabel.cpp.orig	Thu Dec 16 16:08:40 2004
+++ xca-0.5.1/widgets/clicklabel.cpp	Fri Dec 17 12:28:01 2004
@@ -58,7 +58,7 @@
 ClickLabel::ClickLabel( QWidget* parent,  const char* name, WFlags f )
 	:QLabel( parent, name, f )
 {
-	QFont font( font() );
+	QFont font;
 	font.setBold(true);
 	setFont( font );
 	setFrameShape( QLabel::Panel );
*** end of patch


----- End forwarded message -----
-- 
  j p d (at) d s b (dot) t u d e l f t (dot) n l .
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list