From 468c601157166ed706b4f1f24144477ed4690c95 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 10 Feb 2011 17:13:26 +0000 Subject: G'MIC stands for GREYC's Magic Image Converter. This project aims to: * Define a minimal but powerful script language (G'MIC) dedicated to the design of image processing pipelines. * Provide an interpreter of this language (in C++), distributed as an open-source module/library embeddable in third-party applications. * Propose two binary tools embedding this interpreter : o The command-line executable gmic to use the G'MIC framework from a shell. o The interactive plug-in gmic_gimp to bring G'MIC capabilities to the image retouching software GIMP. WWW: http://gmic.sourceforge.net PR: ports/154595 Submitted by: Mahmatkhanov Ruslan --- graphics/Makefile | 1 + graphics/gimp-gmic-plugin/Makefile | 74 ++++++++++++++++++++++ graphics/gimp-gmic-plugin/distinfo | 2 + graphics/gimp-gmic-plugin/files/patch-configure | 55 ++++++++++++++++ graphics/gimp-gmic-plugin/files/patch-src_Makefile | 57 +++++++++++++++++ graphics/gimp-gmic-plugin/pkg-descr | 12 ++++ graphics/gimp-gmic-plugin/pkg-plist | 69 ++++++++++++++++++++ 7 files changed, 270 insertions(+) create mode 100644 graphics/gimp-gmic-plugin/Makefile create mode 100644 graphics/gimp-gmic-plugin/distinfo create mode 100644 graphics/gimp-gmic-plugin/files/patch-configure create mode 100644 graphics/gimp-gmic-plugin/files/patch-src_Makefile create mode 100644 graphics/gimp-gmic-plugin/pkg-descr create mode 100644 graphics/gimp-gmic-plugin/pkg-plist (limited to 'graphics') diff --git a/graphics/Makefile b/graphics/Makefile index 9c1cedb6bc97..9c1093d50d10 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -252,6 +252,7 @@ SUBDIR += gimp-data-extras SUBDIR += gimp-focusblur-plugin SUBDIR += gimp-gap + SUBDIR += gimp-gmic-plugin SUBDIR += gimp-greycstoration SUBDIR += gimp-help SUBDIR += gimp-lqr-plugin diff --git a/graphics/gimp-gmic-plugin/Makefile b/graphics/gimp-gmic-plugin/Makefile new file mode 100644 index 000000000000..78374f3e874a --- /dev/null +++ b/graphics/gimp-gmic-plugin/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: gimp-gmic-plugin +# Date created: 07 Feb 2011 +# Whom: Mahmatkhanov Ruslan +# +# $FreeBSD$ +# + +PORTNAME= gmic +PORTVERSION= 1.4.8.1 +CATEGORIES= graphics +MASTER_SITES= SF/${PORTNAME} +PKGNAMEPREFIX= gimp- +PKGNAMESUFFIX= -plugin +DISTNAME= ${PORTNAME}_${PORTVERSION}_testing + +MAINTAINER= cvs-src@yandex.ru +COMMENT= GREYC's Magic Image Converter + +LIB_DEPENDS= GraphicsMagick++.1:${PORTSDIR}/graphics/GraphicsMagick \ + IlmImf.6:${PORTSDIR}/graphics/OpenEXR \ + Magick++.4:${PORTSDIR}/graphics/ImageMagick \ + avcodec.1:${PORTSDIR}/multimedia/ffmpeg \ + cv.2:${PORTSDIR}/graphics/opencv \ + fftw3.5:${PORTSDIR}/math/fftw3 \ + gimp-2.0:${PORTSDIR}/graphics/gimp-app + +OPTIONS= BASH "Install programmable completions for Bash" off + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_XORG= x11 xext xrandr + +PLUGIN_DIR?= libexec/gimp/2.2/plug-ins +PLIST_SUB+= PLUGIN_DIR=${PLUGIN_DIR} + +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" +CFLAGS:= ${CFLAGS:N-O*:N-pipe} +CXXFLAGS:= ${CXXFLAGS:N-O*:N-pipe} + +MAN1= gmic.1 +MANCOMPRESSED= yes + +.include + +.if defined(WITH_BASH) +RUN_DEPENDS+= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash +PLIST_SUB+= BASH="" +.else +PLIST_SUB+= BASH="@comment " +.endif + +post-patch: + @${REINPLACE_CMD} -e 's#/usr/X11R6#${PREFIX}#g' \ + ${WRKSRC}/src/Makefile + +do-install: + @${MKDIR} ${PREFIX}/${PLUGIN_DIR} + ${INSTALL_PROGRAM} ${WRKSRC}/src/gmic_gimp ${PREFIX}/${PLUGIN_DIR} + ${INSTALL_PROGRAM} ${WRKSRC}/src/gmic ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/man/gmic.1.gz ${MANPREFIX}/man/man1 +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR}/img + @${CP} -R ${WRKSRC}/html/*.* ${DOCSDIR} + @(cd ${WRKSRC}/html/img && ${COPYTREE_SHARE} \* ${DOCSDIR}/img) +.endif +.if defined(WITH_BASH) + ${INSTALL_SCRIPT} ${WRKSRC}/src/gmic_bashcompletion.sh \ + ${PREFIX}/etc/bash_completion.d +.endif + +.include diff --git a/graphics/gimp-gmic-plugin/distinfo b/graphics/gimp-gmic-plugin/distinfo new file mode 100644 index 000000000000..ec8ddd48806c --- /dev/null +++ b/graphics/gimp-gmic-plugin/distinfo @@ -0,0 +1,2 @@ +SHA256 (gmic_1.4.8.1_testing.tar.gz) = 6fd48d2e478b3f3a7cba413b1e0093998b38318372a420d597bfe98161d7b252 +SIZE (gmic_1.4.8.1_testing.tar.gz) = 14729296 diff --git a/graphics/gimp-gmic-plugin/files/patch-configure b/graphics/gimp-gmic-plugin/files/patch-configure new file mode 100644 index 000000000000..e52ab7923a91 --- /dev/null +++ b/graphics/gimp-gmic-plugin/files/patch-configure @@ -0,0 +1,55 @@ +--- configure.orig 2011-02-07 11:24:18.000000000 +0300 ++++ configure 2011-02-07 20:19:00.000000000 +0300 +@@ -4807,52 +4807,6 @@ + + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 +-$as_echo_n "checking for main in -lnsl... " >&6; } +-if test "${ac_cv_lib_nsl_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lnsl $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +-int +-main () +-{ +-return main (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_nsl_main=yes +-else +- ac_cv_lib_nsl_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 +-$as_echo "$ac_cv_lib_nsl_main" >&6; } +-if test "x$ac_cv_lib_nsl_main" = x""yes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBNSL 1 +-_ACEOF +- +- LIBS="-lnsl $LIBS" +- +-else +- +- echo "***" +- echo "** Fatal Error : Header or library files for 'libnsl' are missing but are mandatory to compile G'MIC. **" +- echo "***" +- exit -1 +- +-fi +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpng" >&5 + $as_echo_n "checking for main in -lpng... " >&6; } + if test "${ac_cv_lib_png_main+set}" = set; then : diff --git a/graphics/gimp-gmic-plugin/files/patch-src_Makefile b/graphics/gimp-gmic-plugin/files/patch-src_Makefile new file mode 100644 index 000000000000..df60eb549c7b --- /dev/null +++ b/graphics/gimp-gmic-plugin/files/patch-src_Makefile @@ -0,0 +1,57 @@ +--- src/Makefile.orig 2011-02-07 11:24:18.000000000 +0300 ++++ src/Makefile 2011-02-08 00:08:10.000000000 +0300 +@@ -56,7 +56,7 @@ + USR = /opt/local + else + PLUGINDIR=`gimptool-2.0 --gimpplugindir`/plug-ins +-USR = /usr ++USR = /usr/X11R6 + endif + ifeq ($(OS),MINGW32_NT-5.1) + EXE = .exe +@@ -101,7 +101,7 @@ + + # Flags to enable fast display, using XShm. + XSHM_CFLAGS = -Dcimg_use_xshm +-XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext ++XSHM_LDFLAGS = -L/usr/X11R6/lib -lXext + + # Flags to enable image display, using GDI32. + GDI32_CFLAGS = -Dcimg_display=2 +@@ -222,6 +222,14 @@ + $(MAKE) bashcompletion + $(MAKE) gimp + else ++ifeq ($(OS),FreeBSD) ++ @echo "**" ++ @echo "** FreeBSD configuration" ++ @echo "**" ++ $(MAKE) freebsd ++ $(MAKE) bashcompletion ++ $(MAKE) gimp ++else + ifeq ($(OS),Darwin) + @echo "**" + @echo "** MacOSX configuration" +@@ -238,9 +246,10 @@ + $(MAKE) gimp + endif + endif ++endif + + gimp: +- $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS)" "STRIP_EXE=1" gmic_gimp ++ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS)" "STRIP_EXE=1" gmic_gimp + + lib: + $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS)" gmic_lib +@@ -255,6 +264,9 @@ + linux: + $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic + ++freebsd: ++ $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS)" "LDFLAGS+=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic ++ + custom: + $(MAKE) "CFLAGS+=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic + diff --git a/graphics/gimp-gmic-plugin/pkg-descr b/graphics/gimp-gmic-plugin/pkg-descr new file mode 100644 index 000000000000..a77449f99f08 --- /dev/null +++ b/graphics/gimp-gmic-plugin/pkg-descr @@ -0,0 +1,12 @@ +G'MIC stands for GREYC's Magic Image Converter. This project aims to: + + * Define a minimal but powerful script language (G'MIC) dedicated to the + design of image processing pipelines. + * Provide an interpreter of this language (in C++), distributed as an + open-source module/library embeddable in third-party applications. + * Propose two binary tools embedding this interpreter : + o The command-line executable gmic to use the G'MIC framework from a shell. + o The interactive plug-in gmic_gimp to bring G'MIC capabilities to the image + retouching software GIMP. + +WWW: http://gmic.sourceforge.net diff --git a/graphics/gimp-gmic-plugin/pkg-plist b/graphics/gimp-gmic-plugin/pkg-plist new file mode 100644 index 000000000000..40de7e4292f6 --- /dev/null +++ b/graphics/gimp-gmic-plugin/pkg-plist @@ -0,0 +1,69 @@ +bin/gmic +%%BASH%%etc/bash_completion.d/gmic_bashcompletion.sh +%%PLUGIN_DIR%%/gmic_gimp +%%PORTDOCS%%%%DOCSDIR%%/album.rss +%%PORTDOCS%%%%DOCSDIR%%/build-tutorial.sh +%%PORTDOCS%%%%DOCSDIR%%/chat.shtml +%%PORTDOCS%%%%DOCSDIR%%/contrast.markdown.txt +%%PORTDOCS%%%%DOCSDIR%%/copyright.html +%%PORTDOCS%%%%DOCSDIR%%/definingcommands.markdown.txt +%%PORTDOCS%%%%DOCSDIR%%/favicon.ico +%%PORTDOCS%%%%DOCSDIR%%/favicon.png +%%PORTDOCS%%%%DOCSDIR%%/footer.html +%%PORTDOCS%%%%DOCSDIR%%/gallery.shtml +%%PORTDOCS%%%%DOCSDIR%%/gallery_content.html +%%PORTDOCS%%%%DOCSDIR%%/gimp.shtml +%%PORTDOCS%%%%DOCSDIR%%/header.html +%%PORTDOCS%%%%DOCSDIR%%/img/beach.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/biche.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/chloe.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/download_butt.gif +%%PORTDOCS%%%%DOCSDIR%%/img/gimp_shot.png +%%PORTDOCS%%%%DOCSDIR%%/img/gimp_shot2.png +%%PORTDOCS%%%%DOCSDIR%%/img/gimp_shot3.png +%%PORTDOCS%%%%DOCSDIR%%/img/gimp_shot_big.png +%%PORTDOCS%%%%DOCSDIR%%/img/house.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/item_authors.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_copyrights.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_custom.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_documentation.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_features.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_gallery.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_installation.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_intro.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_license.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_licenses.gif +%%PORTDOCS%%%%DOCSDIR%%/img/item_summary.gif +%%PORTDOCS%%%%DOCSDIR%%/img/logo.png +%%PORTDOCS%%%%DOCSDIR%%/img/logo2.png +%%PORTDOCS%%%%DOCSDIR%%/img/logoGMIC.ppm +%%PORTDOCS%%%%DOCSDIR%%/img/rss.png +%%PORTDOCS%%%%DOCSDIR%%/img/ss_anim3d.gif +%%PORTDOCS%%%%DOCSDIR%%/img/ss_brain3d.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_caesar.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_colors3d.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_cubism.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_ellipses.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_lena_denoise.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_lenacube3d.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_mandelbrot.png +%%PORTDOCS%%%%DOCSDIR%%/img/ss_morph.gif +%%PORTDOCS%%%%DOCSDIR%%/img/ss_object3d.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_plot.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_surface.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_tiger.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_xlife.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/ss_xspline.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/statue.jpg +%%PORTDOCS%%%%DOCSDIR%%/img/tiger.jpg +%%PORTDOCS%%%%DOCSDIR%%/index.shtml +%%PORTDOCS%%%%DOCSDIR%%/introduction.markdown.txt +%%PORTDOCS%%%%DOCSDIR%%/reference.shtml +%%PORTDOCS%%%%DOCSDIR%%/repository.shtml +%%PORTDOCS%%%%DOCSDIR%%/style.css +%%PORTDOCS%%%%DOCSDIR%%/tutorial-header.markdown.txt +%%PORTDOCS%%%%DOCSDIR%%/tutorial.shtml +%%PORTDOCS%%%%DOCSDIR%%/tutorial_photoillustration.pdf +%%PORTDOCS%%@dirrm %%DOCSDIR%%/img +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrmtry %%PLUGIN_DIR%% -- cgit v1.2.3