This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITA] qhull-2003.1-1


>>>>> Marco Atzeri writes:

    > Hi All,
    > I would like to adopt Qhull, as it is one of the
    > packages needed to compile octave.
    > It is also present in debian


01:37 PM [517]> cygport qhull-2003.1-1.cygport prep compile 
>>> Preparing qhull-2003.1-1
*** Info: CYGPORT SCRIPT signature missing.
*** Info: CYGWIN PATCH signature missing.
*** Info: SOURCE PATCH signature missing.
>>> Unpacking source qhull-2003.1-src.tgz
>>> Preparing working source directory
*** Info: applying patch qhull-2003.1-1.cygwin.patch:
patching file CYGWIN-PATCHES/README
patching file CYGWIN-PATCHES/lib-devel.hint
patching file CYGWIN-PATCHES/lib-devel.hint~
patching file CYGWIN-PATCHES/lib.hint
patching file CYGWIN-PATCHES/setup.hint
*** Info: applying patch qhull-2003.1-1.src.patch:
patching file src/qhull-2003.1/src/Makefile.cygwin
>>> Compiling qhull-2003.1-1
make: Makefile.cygwin: No such file or directory
make: *** No rule to make target `Makefile.cygwin'.  Stop.
*** ERROR: make failed


Somehow the Makefile.cygwin is placed below (topsrcdir)/src/qhull-2003.1/src/qhull-2003.1


The attached patch fixes it for me. Also attached a modified .cygport
file to build outside of the source directory and a cygwin specific
patch which fixes a setup.hint error.

Ciao
 Volker

diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x at-3.1.8-31.install.orig -x hdf5-1.6.7-1.src.patch.orig -x libmad-0.15.1b-1.sh.orig -x libmcrypt-2.5.8-1.src.patch.orig -x postgresql-8.1.4-1.cygport.orig -x rcs-5.7-4.src.patch.orig -x template-package.sh.orig -x '*.rej' -x '*.spec' -x '*.temp' -x '*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in origsrc/qhull-2003.1/src/Makefile src/qhull-2003.1/src/Makefile
--- origsrc/qhull-2003.1/src/Makefile	2003-12-31 04:20:50.000000000 +0100
+++ src/qhull-2003.1/src/Makefile	2008-04-27 14:35:02.890625000 +0200
@@ -142,28 +142,30 @@
 	@echo the next line may need to be removed.
 	-test -x /bin/ranlib -o -x /usr/bin/ranlib && ranlib libqhull.a
 
+cygqhull.dll: $(OBJS) libqhull.a
+	gcc -shared -o cygqhull.dll \
+    		-Wl,--out-implib=libqhull.dll.a \
+    		-Wl,--export-all-symbols \
+    		-Wl,--enable-auto-import \
+		$(OBJS)
+#    		-Wl,--whole-archive ${old_libs} \
+#    		-Wl,--no-whole-archive ${dependency_libs}
+
 # don't use ../qconvex.  Does not work on Red Hat Linux
-qconvex: qconvex.o libqhull.a
-	$(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lqhull -lm 
-	cp qconvex ..
-
-qdelaunay: qdelaun.o libqhull.a
-	$(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lqhull -lm 
-	cp qdelaunay ..
-
-qhalf: qhalf.o libqhull.a
-	$(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lqhull -lm 
-	cp qhalf ..
-
-qvoronoi: qvoronoi.o libqhull.a
-	$(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lqhull -lm 
-	cp qvoronoi ..
-
-qhull: unix.o libqhull.a
-	$(CC) -o qhull $(CCOPTS2) unix.o -L. -lqhull -lm 
-	cp qhull ..
-	-chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
-	-cd ..; ./rbox D4 | ./qhull
+qconvex: qconvex.o cygqhull.dll
+	$(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lcygqhull -lm 
+
+qdelaunay: qdelaun.o cygqhull.dll
+	$(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lcygqhull -lm 
+
+qhalf: qhalf.o cygqhull.dll
+	$(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lcygqhull -lm 
+
+qvoronoi: qvoronoi.o cygqhull.dll
+	$(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lcygqhull -lm 
+
+qhull: unix.o cygqhull.dll
+	$(CC) -o qhull $(CCOPTS2) unix.o -L. -lcygqhull -lm 
 
 # compile qhull without using libqhull.a
 qhullx: qconvex.o qdelaun.o qhalf.o qvoronoi.o unix.o $(OBJS)
@@ -178,14 +180,11 @@
 
 rbox: rbox.o
 	$(CC) -o rbox rbox.o $(CCOPTS2) -lm
-	cp rbox ..
 
-user_eg: user_eg.o libqhull.a 
-	$(CC)  -o user_eg $(CCOPTS2) user_eg.o  -L. -lqhull -lm 
-	cp user_eg ..
-
-user_eg2: user_eg2.o libqhull.a 
-	$(CC)  -o user_eg2 $(CCOPTS2) user_eg2.o  -L. -lqhull -lm 
-	cp user_eg2 ..
+user_eg: user_eg.o cygqhull.dll
+	$(CC)  -o user_eg $(CCOPTS2) user_eg.o  -L. -lcygqhull -lm 
+
+user_eg2: user_eg2.o cygqhull.dll 
+	$(CC)  -o user_eg2 $(CCOPTS2) user_eg2.o  -L. -lcygqhull -lm 
 
 # end of Makefile
diff -urN origsrc/qhull-2003.1/CYGWIN-PATCHES/README src/qhull-2003.1/CYGWIN-PATCHES/README
--- origsrc/qhull-2003.1/CYGWIN-PATCHES/README	1970-01-01 01:00:00.000000000 +0100
+++ src/qhull-2003.1/CYGWIN-PATCHES/README	2008-04-27 14:33:16.593750000 +0200
@@ -0,0 +1,34 @@
+qhull
+------------------------------------------
+  Qhull is a general dimension convex hull program that reads a set 
+  of points from stdin, and outputs the smallest convex set that contains 
+  the points to stdout.  It also generates Delaunay triangulations, Voronoi 
+  diagrams, furthest-site Voronoi diagrams, and halfspace intersections
+  about a point.  
+------------------------------------------
+
+License:
+  Qhull is free software from 
+	The National Science and Technology Research Center for
+        Computation and Visualization of Geometric Structures
+  see COPYING.txt for complete license
+
+Runtime requirements:
+  cygwin-1.5.25 or newer
+
+Build requirements:
+  cygwin
+  gcc-3.3.3  or newer
+  binutils-20030901-1 or newer
+  unzip, binutils,  gcc,
+  gperf, make, less, readline, 
+  diff, patch, texi2html
+
+Canonical homepage:
+  http://www.qhull.org
+
+------------------------------------
+
+----------  qhull-2003.1-1  -----------
+Porting to cygwin as split package
+
diff -urN origsrc/qhull-2003.1/CYGWIN-PATCHES/lib-devel.hint src/qhull-2003.1/CYGWIN-PATCHES/lib-devel.hint
--- origsrc/qhull-2003.1/CYGWIN-PATCHES/lib-devel.hint	1970-01-01 01:00:00.000000000 +0100
+++ src/qhull-2003.1/CYGWIN-PATCHES/lib-devel.hint	2008-04-27 14:33:16.593750000 +0200
@@ -0,0 +1,8 @@
+sdesc: "Qhull (convex hull program) - (development)"
+category: Libs Devel Math
+requires: cygwin libqhull
+external-source: qhull
+ldesc: "Qhull is a general dimension convex hull program, 
+it also generates Delaunay triangulations, Voronoi
+diagrams, furthest-site Voronoi diagrams, and halfspace 
+intersections about a point."
diff -urN origsrc/qhull-2003.1/CYGWIN-PATCHES/lib.hint src/qhull-2003.1/CYGWIN-PATCHES/lib.hint
--- origsrc/qhull-2003.1/CYGWIN-PATCHES/lib.hint	1970-01-01 01:00:00.000000000 +0100
+++ src/qhull-2003.1/CYGWIN-PATCHES/lib.hint	2008-04-27 14:33:16.593750000 +0200
@@ -0,0 +1,8 @@
+sdesc: "Qhull (convex hull program) - (runtime)"
+category: Libs Math
+requires: cygwin
+external-source: qhull
+ldesc: "Qhull is a general dimension convex hull program, 
+it also generates Delaunay triangulations, Voronoi
+diagrams, furthest-site Voronoi diagrams, and halfspace 
+intersections about a point."
diff -urN origsrc/qhull-2003.1/CYGWIN-PATCHES/setup.hint src/qhull-2003.1/CYGWIN-PATCHES/setup.hint
--- origsrc/qhull-2003.1/CYGWIN-PATCHES/setup.hint	1970-01-01 01:00:00.000000000 +0100
+++ src/qhull-2003.1/CYGWIN-PATCHES/setup.hint	2008-04-27 14:33:16.593750000 +0200
@@ -0,0 +1,7 @@
+sdesc: "Qhull is a general dimension convex hull program"
+category: Math
+requires: cygwin libqhull
+ldesc: "Qhull is a general dimension convex hull program, 
+it also generates Delaunay triangulations, Voronoi
+diagrams, furthest-site Voronoi diagrams, and halfspace 
+intersections about a point."
# $Id: sample.cygport,v 1.5 2006/11/20 05:48:58 yselkowitz Exp $
ORIG_PN="qhull"

DESCRIPTION="Qhull implements the Quickhull algorithm for computing the convex hull"
HOMEPAGE="http://www.qhull.org/";
SRC_URI="http://www.qhull.org/download/${ORIG_PN}-${PV}-src.tgz";

PKG_NAMES="${PN} lib${PN}-devel lib${PN}"
PKG_HINTS="setup lib-devel lib"
PKG_CONTENTS[0]='usr/bin/*.exe usr/share/'
PKG_CONTENTS[1]='usr/include/ usr/lib/'
PKG_CONTENTS[2]='usr/bin/cyg*'

# We do not use the standard src_compile and src_test.


src_compile() {
        cd ${S}
        lndirs
        cd ${B}/src
        cygmake
}


src_test() {
	:
}

src_install() {
        cd ${B}/src
	dobin qconvex.exe  qdelaunay.exe  qhalf.exe  qhull.exe  qvoronoi.exe  rbox.exe
	dobin cygqhull.dll
	dolib libqhull.dll.a libqhull.a
	insinto /usr/include/${ORIG_PN}
    	doins ${S}/src/*.h

        cd ${S}
	newman html/rbox.man rbox.1 
	newman html/qhull.man qhull.1 

	dodoc *.txt
	dodoc src/Changes.txt
	dodoc index.htm

	insinto /usr/share/doc/${ORIG_PN}-${PV}/html
	doins html/*htm

	insinto /usr/share/doc/${ORIG_PN}-${PV}/src
	doins src/*htm
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]