diff options
author | gahr <gahr@FreeBSD.org> | 2013-10-01 17:41:10 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-10-01 17:41:10 +0800 |
commit | 8ede6f11b92dc654c54fd72fffa74c983e84e4b8 (patch) | |
tree | db32482394fe2f8dab41c20be915255954b1baae /math | |
parent | b155b86ec919cc5828a620e7233eacea27a3ec97 (diff) | |
download | freebsd-ports-gnome-8ede6f11b92dc654c54fd72fffa74c983e84e4b8.tar.gz freebsd-ports-gnome-8ede6f11b92dc654c54fd72fffa74c983e84e4b8.tar.zst freebsd-ports-gnome-8ede6f11b92dc654c54fd72fffa74c983e84e4b8.zip |
- Fix build with modern compilers
- Convert to USES+=tk
- Convert to OPTIONSng
- STAGE-clean
Diffstat (limited to 'math')
-rw-r--r-- | math/goblin/Makefile | 58 | ||||
-rw-r--r-- | math/goblin/files/patch-Makefile | 78 | ||||
-rw-r--r-- | math/goblin/files/patch-lib_src_indexSet.cpp | 10 | ||||
-rw-r--r-- | math/goblin/pkg-plist | 145 |
4 files changed, 114 insertions, 177 deletions
diff --git a/math/goblin/Makefile b/math/goblin/Makefile index 3b44b4ccfc2e..518e5e18f104 100644 --- a/math/goblin/Makefile +++ b/math/goblin/Makefile @@ -13,27 +13,25 @@ COMMENT= A Graph Object Library for Network Programming Problems CONFLICTS= glpk-* -USE_GCC= any -NO_CCACHE= yes -USE_TK= yes -USES= gmake +OPTIONS_DEFINE= DOCS EXAMPLES + +USES= gmake tk USE_LDCONFIG= yes MAKE_ARGS= CC="${CC}" CCFLAGS="${CFLAGS}" \ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ LD="${CXX}" LIBS="-lm ${LDFLAGS}" \ - libtcl=${USE_TCL} libtk=${USE_TK} \ + libtcl=${TCL_SHLIB_VER} libtk=${TK_SHLIB_VER} \ prefix=${PREFIX} ALL_TARGET= all shared -PLIST_SUB+= VERSION=${PORTVERSION:R} - MAKE_JOBS_UNSAFE= yes +PORTDOCS= * +PORTEXAMPLES= * CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER} -I${LOCALBASE}/include/ \ -I${LOCALBASE}/include/tk${TK_VER} ${PTHREAD_CFLAGS} -LDFLAGS+= -L${LOCALBASE}/lib -ltcl${USE_TCL} -ltk${USE_TK} ${PTHREAD_LIBS} +LDFLAGS+= -L${LOCALBASE}/lib -ltcl${TCL_SHLIB_VER} -ltk${TK_SHLIB_VER} ${PTHREAD_LIBS} -NO_STAGE= yes -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> .if ${ARCH} == "amd64" CFLAGS+= -fPIC @@ -52,26 +50,26 @@ post-patch: 's|malloc\.h|stdlib.h|g' do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/bin/gosh ${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/bin/goblet ${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/display ${PREFIX}/bin/goblin-display - ${INSTALL} -d ${PREFIX}/include/${PORTNAME} - (cd ${WRKSRC}/include && ${COPYTREE_SHARE} \*.h ${PREFIX}/include/${PORTNAME}) - ${INSTALL} -d ${PREFIX}/lib/${PORTNAME} - (cd ${WRKSRC}/tcl && ${COPYTREE_SHARE} \* ${PREFIX}/lib/${PORTNAME}) - ${INSTALL_DATA} ${WRKSRC}/lib/libgoblin.a ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/libgoblin.so ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/lib/libglpk.a ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/libglpk.so ${PREFIX}/lib -.if !defined(NOPORTDOCS) - ${INSTALL} -d ${DOCSDIR} - ${INSTALL} -d ${DOCSDIR}/html - (cd ${WRKSRC}/html && ${COPYTREE_SHARE} \* ${DOCSDIR}/html) - (cd ${WRKSRC}/doku && ${COPYTREE_SHARE} \* ${DOCSDIR}) + ${INSTALL_PROGRAM} ${WRKSRC}/bin/gosh ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/bin/goblet ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/display ${STAGEDIR}${PREFIX}/bin/goblin-display + @${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} + (cd ${WRKSRC}/include && ${COPYTREE_SHARE} \*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}) + ${INSTALL} -d ${STAGEDIR}${PREFIX}/lib/${PORTNAME} + (cd ${WRKSRC}/tcl && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/lib/${PORTNAME}) + ${INSTALL_DATA} ${WRKSRC}/lib/libgoblin.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libgoblin.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/lib/libglpk.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libglpk.so ${STAGEDIR}${PREFIX}/lib +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR}/html + (cd ${WRKSRC}/html && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/html) + (cd ${WRKSRC}/doku && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) .endif -.if !defined(NOPORTEXAMPLES) - ${INSTALL} -d ${EXAMPLESDIR} - (cd ${WRKSRC}/samples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}) +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC}/samples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/math/goblin/files/patch-Makefile b/math/goblin/files/patch-Makefile index 83231f08c38c..c9f1803b2aa8 100644 --- a/math/goblin/files/patch-Makefile +++ b/math/goblin/files/patch-Makefile @@ -1,6 +1,62 @@ --- Makefile.orig 2009-10-11 02:10:45.000000000 +0200 -+++ Makefile 2013-06-05 09:47:06.000000000 +0200 -@@ -367,11 +367,7 @@ ++++ Makefile 2013-10-01 11:00:03.000000000 +0200 +@@ -188,7 +188,6 @@ + .depend : + @rm -f .depend + @touch .depend +-ifeq ($(CC),gcc) + @echo -e "$(lib_src_path)/\c" > dir.depend + @for srcfile in $(lib_sources); do \ + cat dir.depend >> .depend; \ +@@ -221,27 +220,6 @@ + done + @rm part.depend + @rm dir.depend +-else +- @for srcfile in $(lib_sources); do \ +- makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \ +- done +- @echo -e "$(glpk_src_path)/\c" > dir.depend; +- @for srcfile in $(glpk_sources); do \ +- makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \ +- done +- @echo -e "$(glpk_wrap_path)/\c" > dir.depend +- @for srcfile in $(wrap_sources); do \ +- makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \ +- done +- @echo -e "$(shell_src_path)/\c" > dir.depend +- @for srcfile in $(shell_sources); do \ +- makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \ +- done +- @echo -e "$(main_src_path)/\c" > dir.depend +- @for srcfile in $(solve_sources); do \ +- makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \ +- done +-endif + @echo "...Dependencies generated" + + +@@ -335,19 +313,11 @@ + shared : intro $(shared_objects) + + libgoblin.$(so_suffix) : $(lib_objects) $(shell_objects) +-ifeq ($(CC),gcc) + $(LD) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS) $(LIBS) +-else +- $(LD) -G -o $@ $^ $(LDFLAGS) $(LIBS) +-endif + @echo "...Shared object ($@) has been successfully linked" + + libglpk.$(so_suffix) : $(glpk_objects) $(wrap_objects) +-ifeq ($(CC),gcc) + $(LD) -shared -Wl,-soname,$@ -o $@ $(shell_objects) $^ -L. $(LDFLAGS) $(LIBS) -lgoblin +-else +- $(LD) -G -o $@ $(shell_objects) $^ -L. $(LDFLAGS) $(LIBS) -lgoblin +-endif + @echo "...Shared object ($@) has been successfully linked" + + +@@ -367,11 +337,7 @@ else gosh : $(gosh_objects) $(shared_objects) @@ -12,3 +68,21 @@ @echo "...Shell tool ($@) has been linked with shared object" endif +@@ -648,7 +618,7 @@ + mkdir -p bin + ifneq ($(link_mode),dynamic) + mv gosh$(exe_suffix) bin +- echo "#!$(PWD)/bin/gosh" > bin/goblet ++ echo "#!$(prefix)/bin/gosh" > bin/goblet + else + echo "#!$(wish_name)" > bin/goblet + echo "" >> bin/goblet +@@ -659,7 +629,7 @@ + endif + echo "" >> bin/goblet + echo "set GoblinVersion $(version)" >> bin/goblet +- echo "set GoblinTclPath [file join $(PWD) tcl]" \ ++ echo "set GoblinTclPath $(prefix)/lib/goblin" \ + >> bin/goblet + echo "" >> bin/goblet + cat goblet >> bin/goblet diff --git a/math/goblin/files/patch-lib_src_indexSet.cpp b/math/goblin/files/patch-lib_src_indexSet.cpp new file mode 100644 index 000000000000..076b648f5041 --- /dev/null +++ b/math/goblin/files/patch-lib_src_indexSet.cpp @@ -0,0 +1,10 @@ +--- lib_src/indexSet.cpp.orig 2013-10-01 10:15:14.000000000 +0200 ++++ lib_src/indexSet.cpp 2013-10-01 10:15:03.000000000 +0200 +@@ -390,3 +390,7 @@ + + template class indexSetComplement<unsigned short>; + template class indexSetComplement<unsigned long>; ++template indexSet<unsigned long>::indexSet(unsigned long, goblinController &); ++template indexSet<unsigned long>::~indexSet(); ++template indexSet<unsigned short>::indexSet(unsigned short, goblinController &); ++template indexSet<unsigned short>::~indexSet(); diff --git a/math/goblin/pkg-plist b/math/goblin/pkg-plist index e081dfaca222..4bac11f8796e 100644 --- a/math/goblin/pkg-plist +++ b/math/goblin/pkg-plist @@ -228,150 +228,5 @@ lib/libglpk.a lib/libglpk.so lib/libgoblin.a lib/libgoblin.so -%%PORTDOCS%%%%DOCSDIR%%/auxiliary1.eps -%%PORTDOCS%%%%DOCSDIR%%/auxiliary2.eps -%%PORTDOCS%%%%DOCSDIR%%/bipartite1.eps -%%PORTDOCS%%%%DOCSDIR%%/bipartite2.eps -%%PORTDOCS%%%%DOCSDIR%%/branch.eps -%%PORTDOCS%%%%DOCSDIR%%/branch2.eps -%%PORTDOCS%%%%DOCSDIR%%/branch3.eps -%%PORTDOCS%%%%DOCSDIR%%/branchtree.eps -%%PORTDOCS%%%%DOCSDIR%%/browse.ps -%%PORTDOCS%%%%DOCSDIR%%/candidates.eps -%%PORTDOCS%%%%DOCSDIR%%/canonical1.eps -%%PORTDOCS%%%%DOCSDIR%%/canonical2.eps -%%PORTDOCS%%%%DOCSDIR%%/closure1.eps -%%PORTDOCS%%%%DOCSDIR%%/closure2.eps -%%PORTDOCS%%%%DOCSDIR%%/colours.eps -%%PORTDOCS%%%%DOCSDIR%%/connect2.eps -%%PORTDOCS%%%%DOCSDIR%%/connect3.eps -%%PORTDOCS%%%%DOCSDIR%%/def.tex -%%PORTDOCS%%%%DOCSDIR%%/design.eps -%%PORTDOCS%%%%DOCSDIR%%/display1.eps -%%PORTDOCS%%%%DOCSDIR%%/dmxa0296.eps -%%PORTDOCS%%%%DOCSDIR%%/dodekahedronConvex.eps -%%PORTDOCS%%%%DOCSDIR%%/doxygen/doxygen.cfg -%%PORTDOCS%%%%DOCSDIR%%/doxygen/doxygen.css -%%PORTDOCS%%%%DOCSDIR%%/doxygen/footer.html -%%PORTDOCS%%%%DOCSDIR%%/doxygen/header.html -%%PORTDOCS%%%%DOCSDIR%%/edit.ps -%%PORTDOCS%%%%DOCSDIR%%/eps/binTree.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/dodekahedron.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/hexagonalGrid.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/maxFlow.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/optMatch.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/outerplanar.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/polarGrid.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/postmanAfter.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/postmanBefore.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/primalDual.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/queensBoard.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/tjoinShortestPath.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/tspSubOpt.eps -%%PORTDOCS%%%%DOCSDIR%%/eps/unix.eps -%%PORTDOCS%%%%DOCSDIR%%/equilateral.eps -%%PORTDOCS%%%%DOCSDIR%%/euclidian.eps -%%PORTDOCS%%%%DOCSDIR%%/euler3.eps -%%PORTDOCS%%%%DOCSDIR%%/euler4.eps -%%PORTDOCS%%%%DOCSDIR%%/fibheap.eps -%%PORTDOCS%%%%DOCSDIR%%/gallery.tex -%%PORTDOCS%%%%DOCSDIR%%/gedecomp2.eps -%%PORTDOCS%%%%DOCSDIR%%/general1.eps -%%PORTDOCS%%%%DOCSDIR%%/general2.eps -%%PORTDOCS%%%%DOCSDIR%%/gif/binTree.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/browser.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/cuttingPair.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/dodekaStaircase.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/dodekahedron.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/dodekahedronConvex.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/editor.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/equilateral.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/euclidianOneCycle.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/eulerSierpinski.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/intransitiveReduction.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/k7.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/maxCutDirected.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/maxFlow.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/optMatch.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/outerplanar.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/polarGrid.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/postmanAfter.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/postmanBefore.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/primalDual.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/queensBoard.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/seriesParallelMixed.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/tjoinNoPath.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/tjoinShortestPath.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/tspSubOpt.gif -%%PORTDOCS%%%%DOCSDIR%%/gif/unix.gif -%%PORTDOCS%%%%DOCSDIR%%/goblet.ps -%%PORTDOCS%%%%DOCSDIR%%/gsearch.eps -%%PORTDOCS%%%%DOCSDIR%%/hamilton.eps -%%PORTDOCS%%%%DOCSDIR%%/html/headline.html -%%PORTDOCS%%%%DOCSDIR%%/html/hostref.html -%%PORTDOCS%%%%DOCSDIR%%/html/index.html -%%PORTDOCS%%%%DOCSDIR%%/html/logo.gif -%%PORTDOCS%%%%DOCSDIR%%/html/logo.html -%%PORTDOCS%%%%DOCSDIR%%/html/menu.html -%%PORTDOCS%%%%DOCSDIR%%/html/wallpaper.jpg -%%PORTDOCS%%%%DOCSDIR%%/intransitiveReduction.eps -%%PORTDOCS%%%%DOCSDIR%%/lgraph1.eps -%%PORTDOCS%%%%DOCSDIR%%/lgraph2.eps -%%PORTDOCS%%%%DOCSDIR%%/local1.eps -%%PORTDOCS%%%%DOCSDIR%%/local2.eps -%%PORTDOCS%%%%DOCSDIR%%/manual.ind -%%PORTDOCS%%%%DOCSDIR%%/manual.sh -%%PORTDOCS%%%%DOCSDIR%%/manual.tex -%%PORTDOCS%%%%DOCSDIR%%/maxcut1.eps -%%PORTDOCS%%%%DOCSDIR%%/maxmean.eps -%%PORTDOCS%%%%DOCSDIR%%/mincut2.eps -%%PORTDOCS%%%%DOCSDIR%%/mintree.eps -%%PORTDOCS%%%%DOCSDIR%%/mintree1.eps -%%PORTDOCS%%%%DOCSDIR%%/nwsimplex.eps -%%PORTDOCS%%%%DOCSDIR%%/optcirc4.eps -%%PORTDOCS%%%%DOCSDIR%%/posters.tex -%%PORTDOCS%%%%DOCSDIR%%/pr76.eps -%%PORTDOCS%%%%DOCSDIR%%/seriesParallel5.eps -%%PORTDOCS%%%%DOCSDIR%%/sierpinski.eps -%%PORTDOCS%%%%DOCSDIR%%/split1.eps -%%PORTDOCS%%%%DOCSDIR%%/split2.eps -%%PORTDOCS%%%%DOCSDIR%%/steiner.eps -%%PORTDOCS%%%%DOCSDIR%%/stnumber.eps -%%PORTDOCS%%%%DOCSDIR%%/subproblem.eps -%%PORTDOCS%%%%DOCSDIR%%/surface.eps -%%PORTDOCS%%%%DOCSDIR%%/tile6.eps -%%PORTDOCS%%%%DOCSDIR%%/tiling.eps -%%PORTDOCS%%%%DOCSDIR%%/tjoin9.eps -%%PORTDOCS%%%%DOCSDIR%%/torusGrid.eps -%%PORTDOCS%%%%DOCSDIR%%/triangular.eps -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/binTree.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cuttingPair.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dodekaStaircase.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dodekahedron.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dodekahedronConvex.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/equilateral.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/euclidianOneCycle.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/eulerSierpinski.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/intransitiveReduction.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/maxCutDirected.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/maxFlow.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/optMatch.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/outerplanar.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/polarGrid.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/postmanAfter.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/postmanBefore.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/primalDual.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/queensBoard.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/seriesParallelMixed.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tjoinNoPath.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tjoinShortestPath.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tspSubOpt.gob -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/unix.gob @dirrm include/goblin @dirrm lib/goblin -%%PORTDOCS%%@dirrm %%DOCSDIR%%/html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/gif -%%PORTDOCS%%@dirrm %%DOCSDIR%%/eps -%%PORTDOCS%%@dirrm %%DOCSDIR%%/doxygen -%%PORTDOCS%%@dirrm %%DOCSDIR%% -%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% |