Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2012 12:14:18 +0000 (UTC)
From:      Pietro Cerutti <gahr@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r305197 - in head/x11-toolkits/fox14: . files
Message-ID:  <201210031214.q93CEI4g025259@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gahr
Date: Wed Oct  3 12:14:18 2012
New Revision: 305197
URL: http://svn.freebsd.org/changeset/ports/305197

Log:
  - Convert to OptionsNG
  - Add a patch around a wrong ZLib call
  - Normalize patch files names

Added:
     - copied unchanged from r302796, head/x11-toolkits/fox14/files/patch-src::FXFile.cpp
  head/x11-toolkits/fox14/files/patch-src_FXGZStream.cpp   (contents, props changed)
     - copied unchanged from r302796, head/x11-toolkits/fox14/files/patch-src-fxpngio.cpp
Directory Properties:
  head/x11-toolkits/fox14/files/patch-src_FXFile.cpp   (props changed)
  head/x11-toolkits/fox14/files/patch-src_fxpngio.cpp   (props changed)
Deleted:
  head/x11-toolkits/fox14/files/patch-src-fxpngio.cpp
  head/x11-toolkits/fox14/files/patch-src::FXFile.cpp
Modified:
  head/x11-toolkits/fox14/Makefile   (contents, props changed)

Modified: head/x11-toolkits/fox14/Makefile
==============================================================================
--- head/x11-toolkits/fox14/Makefile	Wed Oct  3 11:07:31 2012	(r305196)
+++ head/x11-toolkits/fox14/Makefile	Wed Oct  3 12:14:18 2012	(r305197)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	fox
-# Date created:		23 Feb 2000
-# Whom:			Will Andrews <andrews@technologist.com>
-#
+# Created by: Will Andrews <andrews@technologist.com>
 # $FreeBSD$
-#
 
 PORTNAME=	fox
 PORTVERSION=	${MAJORVER}.${SHVER}
@@ -21,7 +17,7 @@ LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphic
 		tiff.4:${PORTSDIR}/graphics/tiff \
 		Xft.2:${PORTSDIR}/x11-fonts/libXft
 
-CONFLICTS=	fox-1.6.* fox-1.7.*
+#CONFLICTS=	fox-1.6.* fox-1.7.*
 
 LATEST_LINK=	fox14
 
@@ -40,60 +36,57 @@ MAN1=		shutterbug.1 reswrap.1
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS=	OPTIMIZED_CXXFLAGS "Enable additional optimizations" off \
-		CUPS "Enable CUPS support" off \
-		DEBUG "Build with DEBUG support" off \
-		FOX_APPLICATIONS "Install sample applications" off \
-		PROFILING "Build with PROFILING support" off \
-		SHM "Enable Shared Memory support" on \
-		XFT "Enable Xft support" on
+OPTIONS_DEFINE=	OPTIMIZED_CFLAGS CUPS DEBUG APPS PROFILE SHM XFT
+OPTIONS_DEFAULT=SHM XFT
+APPS_DESC=	Install sample applications
+SHM_DESC=	Shared Memory support
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 ##
 ## Additional Options
 ##
 #
-.if defined(WITHOUT_XFT)
-CONFIGURE_ARGS+=	--with-xft=no
-.else
+.if ${PORT_OPTIONS:MXFT}
 CONFIGURE_ARGS+=	--with-xft=yes
 CPPFLAGS+=	`freetype-config --cflags`
 LDFLAGS+=	`freetype-config --libs`
+.else
+CONFIGURE_ARGS+=	--with-xft=no
 .endif
 #
-.if defined(WITHOUT_SHM)
-CONFIGURE_ARGS+=	--with-xshm=no
-.else
+.if ${PORT_OPTIONS:MSHM}
 CONFIGURE_ARGS+=	--with-xshm=yes
+.else
+CONFIGURE_ARGS+=	--with-xshm=no
 .endif
 #
-.if defined(WITH_CUPS)
+.if ${PORT_OPTIONS:MCUPS}
 LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-client
 CONFIGURE_ARGS+=	--enable-cups
 .else
 CONFIGURE_ARGS+=	--disable-cups
 .endif
 #
-.if defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MDEBUG}
 CONFIGURE_ARGS+=	--enable-debug
 .else
 CONFIGURE_ARGS+=	--enable-release
 .endif
 #
-.if defined(WITH_FOX_APPLICATIONS)
+.if ${PORT_OPTIONS:MAPPS}
 MAN1+=		PathFinder.1 adie.1 calculator.1
 PLIST_SUB+=	APPS=""
 .else
 PLIST_SUB+=	APPS="@comment "
 .endif
 #
-.if defined(WITH_OPTIMIZED_CXXFLAGS)
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
 # turn distribution-recommended optimization flags back on
 CXXFLAGS+=	-O2 -Wuninitialized -ffast-math -finline-functions -fomit-frame-pointer -fexpensive-optimizations
 .endif
 #
-.if defined(WITH_PROFILING)
+.if ${PORT_OPTIONS:MPROFILE}
 CONFIGURE_ARGS+=	--with-profiling=gprof
 .endif
 
@@ -114,12 +107,12 @@ post-patch:
 	@${REINPLACE_CMD} -E -e \
 		's|^(screenshotsdir).*$$|\1=${DOCSDIR}/html|' \
 		${WRKSRC}/doc/screenshots/Makefile.in
-.if defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS} == ""
 	@${REINPLACE_CMD} -e \
 		'/^SUBDIRS/s/ doc//' \
 		${WRKSRC}/Makefile.in
 .endif
-.if !defined(WITH_FOX_APPLICATIONS)
+.if ${PORT_OPTIONS:MAPPS} == ""
 	@${REINPLACE_CMD} -E -e \
 		's,^(SUBDIRS.*)adie,\1,; \
 		s,^(SUBDIRS.*)pathfinder,\1,; \
@@ -127,4 +120,4 @@ post-patch:
 		${WRKSRC}/Makefile.in
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Copied: head/x11-toolkits/fox14/files/patch-src_FXFile.cpp (from r302796, head/x11-toolkits/fox14/files/patch-src::FXFile.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/fox14/files/patch-src_FXFile.cpp	Wed Oct  3 12:14:18 2012	(r305197, copy of r302796, head/x11-toolkits/fox14/files/patch-src::FXFile.cpp)
@@ -0,0 +1,47 @@
+--- src/FXFile.cpp.orig	Sat Feb  5 13:10:50 2005
++++ src/FXFile.cpp	Wed Feb  9 17:40:15 2005
+@@ -102,7 +102,7 @@
+ // Get current user name
+ FXString FXFile::getCurrentUserName(){
+ #ifndef WIN32
+-#ifdef FOX_THREAD_SAFE
++#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
+   struct passwd pwdresult,*pwd;
+   char buffer[1024];
+   if(getpwuid_r(geteuid(),&pwdresult,buffer,sizeof(buffer),&pwd)==0 && pwd) return pwd->pw_name;
+@@ -180,7 +180,7 @@
+ // Get home directory for a given user
+ FXString FXFile::getUserDirectory(const FXString& user){
+ #ifndef WIN32
+-#ifdef FOX_THREAD_SAFE
++#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
+   struct passwd pwdresult,*pwd;
+   char buffer[1024];
+   if(user.empty()){
+@@ -1059,7 +1059,7 @@
+ FXString FXFile::owner(FXuint uid){
+   FXchar result[64];
+ #ifndef WIN32
+-#ifdef FOX_THREAD_SAFE
++#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
+   struct passwd pwdresult,*pwd;
+   char buffer[1024];
+   if(getpwuid_r(uid,&pwdresult,buffer,sizeof(buffer),&pwd)==0 && pwd) return pwd->pw_name;
+@@ -1077,7 +1077,7 @@
+ FXString FXFile::group(FXuint gid){
+   FXchar result[64];
+ #ifndef WIN32
+-#ifdef FOX_THREAD_SAFE
++#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
+   ::group grpresult;
+   ::group *grp;
+   char buffer[1024];
+@@ -1435,7 +1435,7 @@
+ // Convert file time to string as per strftime format
+ FXString FXFile::time(const FXchar *format,FXTime filetime){
+ #ifndef WIN32
+-#ifdef FOX_THREAD_SAFE
++#if defined(FOX_THREAD_SAFE) && !defined(__FreeBSD__)
+   time_t tmp=(time_t)FXMAX(filetime,0);
+   struct tm tmresult;
+   FXchar buffer[512];

Added: head/x11-toolkits/fox14/files/patch-src_FXGZStream.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/fox14/files/patch-src_FXGZStream.cpp	Wed Oct  3 12:14:18 2012	(r305197)
@@ -0,0 +1,29 @@
+--- src/FXGZStream.cpp.orig	2012-10-03 10:13:33.000000000 +0200
++++ src/FXGZStream.cpp	2012-10-03 10:15:57.000000000 +0200
+@@ -60,7 +60,7 @@
+   FXASSERT(wrptr<=endptr);
+   if(code==FXStreamOK){
+     m=wrptr-rdptr;
+-    n=gzwrite((gzFile*)file,rdptr,m);
++    n=gzwrite((gzFile)file,rdptr,m);
+     if(0<n){
+       m-=n;
+       if(m){memmove(begptr,rdptr+n,m);}
+@@ -85,7 +85,7 @@
+     if(m){memmove(begptr,rdptr,m);}
+     rdptr=begptr;
+     wrptr=begptr+m;
+-    n=gzread((gzFile*)file,wrptr,endptr-wrptr);
++    n=gzread((gzFile)file,wrptr,endptr-wrptr);
+     if(0<n){
+       wrptr+=n;
+       }
+@@ -117,7 +117,7 @@
+ FXbool FXGZFileStream::close(){
+   if(dir){
+     if(dir==FXStreamSave) flush();
+-    gzclose((gzFile*)file);
++    gzclose((gzFile)file);
+     return FXStream::close();
+     }
+   return FALSE;

Copied: head/x11-toolkits/fox14/files/patch-src_fxpngio.cpp (from r302796, head/x11-toolkits/fox14/files/patch-src-fxpngio.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/fox14/files/patch-src_fxpngio.cpp	Wed Oct  3 12:14:18 2012	(r305197, copy of r302796, head/x11-toolkits/fox14/files/patch-src-fxpngio.cpp)
@@ -0,0 +1,46 @@
+--- src/fxpngio.cpp.orig	2005-11-19 21:22:25.000000000 +0100
++++ src/fxpngio.cpp	2012-05-07 07:11:22.000000000 +0200
+@@ -21,13 +21,13 @@
+ *********************************************************************************
+ * $Id: fxpngio.cpp,v 1.35.2.1 2005/11/19 20:22:25 fox Exp $                         *
+ ********************************************************************************/
++#ifdef HAVE_PNG_H
++#include "png.h"
++#endif
+ #include "fxver.h"
+ #include "fxdefs.h"
+ #include "FXHash.h"
+ #include "FXStream.h"
+-#ifdef HAVE_PNG_H
+-#include "png.h"
+-#endif
+ 
+ /*
+   Notes:
+@@ -76,7 +76,7 @@
+   FXStream* store=(FXStream*)png_get_error_ptr(png_ptr);
+   store->setError(FXStreamFormat);                      // Flag this as a format error in FXStream
+   FXTRACE((100,"Error in png: %s\n",message));
+-  longjmp(png_ptr->jmpbuf,1);                           // Bail out
++  longjmp(png_jmpbuf(png_ptr),1);                           // Bail out
+   }
+ 
+ 
+@@ -121,7 +121,7 @@
+     }
+ 
+   // Set error handling
+-  if(setjmp(png_ptr->jmpbuf)){
++  if(setjmp(png_jmpbuf(png_ptr))){
+ 
+     // Free all of the memory associated with the png_ptr and info_ptr
+     png_destroy_read_struct(&png_ptr,&info_ptr,(png_infopp)NULL);
+@@ -234,7 +234,7 @@
+     }
+ 
+   // Set error handling.
+-  if(setjmp(png_ptr->jmpbuf)){
++  if(setjmp(png_jmpbuf(png_ptr))){
+     png_destroy_write_struct(&png_ptr,&info_ptr);
+     return FALSE;
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210031214.q93CEI4g025259>