From owner-freebsd-ports@FreeBSD.ORG Wed Mar 17 22:09:44 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2953916A4CE for ; Wed, 17 Mar 2004 22:09:44 -0800 (PST) Received: from web41905.mail.yahoo.com (web41905.mail.yahoo.com [66.218.93.156]) by mx1.FreeBSD.org (Postfix) with SMTP id 02A6243D1F for ; Wed, 17 Mar 2004 22:09:44 -0800 (PST) (envelope-from patrick_dkt@yahoo.com.hk) Message-ID: <20040318060943.12391.qmail@web41905.mail.yahoo.com> Received: from [210.0.207.157] by web41905.mail.yahoo.com via HTTP; Thu, 18 Mar 2004 14:09:43 CST Date: Thu, 18 Mar 2004 14:09:43 +0800 (CST) From: =?big5?q?Patrick=20Dung?= To: freebsd-ports@freebsd.org In-Reply-To: <405897C9.2040703@fillmore-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: ssteward@AccessPDF.com cc: eikemeier@fillmore-labs.com Subject: Re: pdftk compiling problems on FreeBSD X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2004 06:09:44 -0000 Thank you. I am now making the files the the ports. It can now fetch the tarball from the pdftk website. I am fighting with the Makefile. Now I have encountered one problem. My machine is a FreeBSD 4.9. It does not have gcj and gcjh (gcc 3.x stuff). After installing the gcc33 port, gcc33, g++33, gcj33, gcjh33 are created. The problem is that the Makefiles in the pdftk tarball hardcoded to use the name of the binaries (e.g., g++, gcj, gcjh) instead of macros. The number of Makefiles is not small, I think I would be silly to make many patch files for them. Regards Patrick Oliver Eikemeier wrote: Sid Steward wrote: > Patrick- > > Thank you for your work. I'll add your FreeBSD Makefile and notes to the > next release of pdftk. > > Thanks for the suggestions, too. I'll work them in. > > Sid > > Patrick Dung wrote: > >>... >> >>FreeBSD 4.9 uses gcc 2.95.4 as system compiler. >>So I install the gcc33 inorder to use the gcj. >># pkgadd -r gcc33 >># cd /usr/local/bin/gcj33 >># ln -s gcj33 gcj >># ln -s gcjh33 gcjh >> >>Changes to Makefile.Base : >>Change g++ to g++33 >> >>Create Makefile.FreeBSD : >># general-purpose options >>CC_OPTS= -lgcj -O2 -I/usr/local/include -L/usr/local/lib -pthread > > -liconv -lz > >># Not related, only g++ is used? >>CC = gcc33 >># Does not work as expected (I have to change g++ to g++33 in > > Makefile.Base) > >>CXX = g++33 >># >>include Makefile.Base >> >>If -pthread is not added, it will have problem when compiling with the > > gcc3.3.x compiler. > >>Do the 'gmake -f Makefile.FreeBSD' and it compiles cleanly. >>And the program works fine. For a port you would use USE_GCC=3.3 which will install gcc and set CC=gcc33 CXX=g++33 automatically. Also USE_GMAKE tells the port to use gmake for building. If you you Makefile has a non-standard name, use MAKEFILE=Makefile.FreeBSD (actually a bug, it should be MAKE_FILE). -pthread should be PTHREAD_CFLAGS and PTHREAD_LIBS. Some more variables can be found in /usr/ports/Mk/bsd.port.mk. Regards Oliver 必殺技、飲歌、小星星... 浪漫鈴聲 情心連繫 http://ringtone.yahoo.com.hk/