diff --git a/astro/wmsolar/Makefile b/astro/wmsolar/Makefile index 4460d1c563be..51be13a22a89 100644 --- a/astro/wmsolar/Makefile +++ b/astro/wmsolar/Makefile @@ -1,27 +1,27 @@ # Created by: Patrick Li # $FreeBSD$ PORTNAME= wmsolar PORTVERSION= 1.1 CATEGORIES= astro windowmaker MAINTAINER= tkuiper@inxsoft.net COMMENT= Dockapp that displays the Solar System viewed from the top LICENSE= GPLv2 USE_GITHUB= yes GH_ACCOUNT= engerim42 PLIST_FILES= bin/wmSolar USE_XORG= x11 xext xpm -USES= gmake +USES= dos2unix gmake pre-patch: @${REINPLACE_CMD} -e 's|values.h|float.h|; s|MAXDOUBLE|DBL_MAX|g' \ ${WRKSRC}/wmSolar.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/wmSolar ${STAGEDIR}${PREFIX}/bin .include diff --git a/astro/wmsolar/files/patch-Makefile b/astro/wmsolar/files/patch-Makefile index 504e2575acda..4e76bbdfb27b 100644 --- a/astro/wmsolar/files/patch-Makefile +++ b/astro/wmsolar/files/patch-Makefile @@ -1,30 +1,30 @@ ---- Makefile.orig Tue Jan 15 17:54:38 2002 -+++ Makefile Tue Jan 15 17:56:37 2002 +--- Makefile.orig 2016-06-20 12:40:27 UTC ++++ Makefile @@ -1,8 +1,6 @@ -CC = g++ -CFLAGS = -O2 -Wall -INCDIR = -I/usr/X11R6/include/X11 -I/usr/X11R6/include +INCDIR = -I${LOCALBASE}/include DESTDIR= /usr/X11R6 -LIBDIR = -L/usr/X11R6/lib +LIBDIR = -L${LOCALBASE}/lib # for linux LIBS = -lXpm -lX11 -lXext -lm # for Solaris -@@ -19,14 +17,14 @@ +@@ -19,14 +17,14 @@ OBJS = wmSolar.o \ RiseSet.o \ Vsop.o .c.o: - $(CC) $(CFLAGS) -D$(shell echo `uname -s`) -c $< -o $*.o $(INCDIR) + $(CXX) $(CXXFLAGS) -c $< -o $*.o $(INCDIR) all: wmSolar.o wmSolar wmSolar.o: wmSolar_master.xpm wmSolar_mask.xbm wmSolar: $(OBJS) - $(CC) $(CFLAGS) $(SYSTEM) -o wmSolar $^ $(INCDIR) $(LIBDIR) $(LIBS) + $(CXX) $(CXXFLAGS) -o wmSolar $^ $(INCDIR) $(LIBDIR) $(LIBS) clean: for i in $(OBJS) ; do \ diff --git a/astro/wmsolar/files/patch-Vsop.h b/astro/wmsolar/files/patch-Vsop.h index 517afb91984b..b43c3e292aa0 100644 --- a/astro/wmsolar/files/patch-Vsop.h +++ b/astro/wmsolar/files/patch-Vsop.h @@ -1,10 +1,10 @@ ---- Vsop.h.orig Tue Nov 26 15:41:59 2002 -+++ Vsop.h Tue Nov 26 15:42:13 2002 +--- Vsop.h.orig 2016-06-20 12:40:27 UTC ++++ Vsop.h @@ -12,6 +12,7 @@ - #define VSOP__H - - #include "PlanetData.h" // for enum Planet + #define VSOP__H + + #include "PlanetData.h" // for enum Planet +#include - - // * * * * * simple support structs * * * * * - + + // * * * * * simple support structs * * * * * + diff --git a/audio/sphinx/Makefile b/audio/sphinx/Makefile index 4247c739cf07..f9eafd7900b8 100644 --- a/audio/sphinx/Makefile +++ b/audio/sphinx/Makefile @@ -1,40 +1,41 @@ # Created by: trevor # $FreeBSD$ PORTNAME= sphinx PORTVERSION= 2.0.4 PORTREVISION= 3 CATEGORIES= audio accessibility MASTER_SITES= SF/cmu${PORTNAME}/${PORTNAME}2/0.4 DISTNAME= sphinx2-0.4 MAINTAINER= ports@FreeBSD.org COMMENT= Speech recognition system GNU_CONFIGURE= yes USE_LDCONFIG= yes PKGMESSAGE= ${WRKDIR}/pkg-message -USES= gmake libtool shebangfix +USES= dos2unix gmake libtool shebangfix +DOS2UNIX_FILES= src/libsphinx2fe/fe_sigproc.c SHEBANG_FILES= scripts/sphinx2-demo.in perl_OLD_CMD= "@PERL@ -w" # contains i386 sound code ONLY_FOR_ARCHS= i386 post-patch: @${REINPLACE_CMD} -e 's:::g' \ ${WRKSRC}/src/libsphinx2/CM_funcs.c \ ${WRKSRC}/src/libsphinx2/hash.c \ ${WRKSRC}/src/libsphinx2/list.c \ ${WRKSRC}/src/libsphinx2/salloc.c post-build: ${ECHO_CMD} "*** WARNING ***" > ${PKGMESSAGE} ${ECHO_CMD} "The sphinx 2 port/package has not had" >> ${PKGMESSAGE} ${ECHO_CMD} "proper testing or source review by the" >> ${PKGMESSAGE} ${ECHO_CMD} "FreeBSD maintainer." >> ${PKGMESSAGE} post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsphinx2*.so .include diff --git a/audio/sphinx/files/patch-src-libsphinx2-include_pconf.h b/audio/sphinx/files/patch-src-libsphinx2-include_pconf.h deleted file mode 100644 index d7646e067e0c..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2-include_pconf.h +++ /dev/null @@ -1,8 +0,0 @@ ---- src/libsphinx2/include/pconf.h.orig 2007-12-06 18:24:09.000000000 +0100 -+++ src/libsphinx2/include/pconf.h 2007-12-06 18:24:20.000000000 +0100 -@@ -124,4 +124,4 @@ - char * (*GetDefault)(char const *, char const *), char last); - void pusage(char *prog, Config_t *cp); - --#endif _PCONF_ -+#endif diff --git a/audio/sphinx/files/patch-src-libsphinx2_eht_quit.c b/audio/sphinx/files/patch-src-libsphinx2_eht_quit.c deleted file mode 100644 index c3c2650101bb..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2_eht_quit.c +++ /dev/null @@ -1,10 +0,0 @@ ---- src/libsphinx2/eht_quit.c.orig 2007-12-06 18:21:53.000000000 +0100 -+++ src/libsphinx2/eht_quit.c 2007-12-06 18:22:13.000000000 +0100 -@@ -85,6 +85,7 @@ - */ - - #include -+#include - #include - - void diff --git a/audio/sphinx/files/patch-src-libsphinx2_prime.c b/audio/sphinx/files/patch-src-libsphinx2_prime.c deleted file mode 100644 index 824091bf1bbc..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2_prime.c +++ /dev/null @@ -1,9 +0,0 @@ ---- src/libsphinx2/prime.c.orig 2007-12-06 18:27:41.000000000 +0100 -+++ src/libsphinx2/prime.c 2007-12-06 18:27:51.000000000 +0100 -@@ -75,5 +75,4 @@ - } - } - --#endif MAIN -- -+#endif diff --git a/audio/sphinx/files/patch-src-libsphinx2_r_agc_noise.c b/audio/sphinx/files/patch-src-libsphinx2_r_agc_noise.c deleted file mode 100644 index e0465672944a..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2_r_agc_noise.c +++ /dev/null @@ -1,10 +0,0 @@ ---- src/libsphinx2/r_agc_noise.c.orig 2007-12-06 18:28:21.000000000 +0100 -+++ src/libsphinx2/r_agc_noise.c 2007-12-06 18:28:49.000000000 +0100 -@@ -34,6 +34,7 @@ - * - */ - #include -+#include - - #include "s2types.h" - #include "c.h" diff --git a/audio/sphinx/files/patch-src-libsphinx2_sc_vq.c b/audio/sphinx/files/patch-src-libsphinx2_sc_vq.c deleted file mode 100644 index 07d5965ad3cc..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2_sc_vq.c +++ /dev/null @@ -1,10 +0,0 @@ ---- src/libsphinx2/sc_vq.c.orig 2007-12-06 18:38:16.000000000 +0100 -+++ src/libsphinx2/sc_vq.c 2007-12-06 18:38:36.000000000 +0100 -@@ -64,6 +64,7 @@ - - #include - #include -+#include - #include - #include - diff --git a/audio/sphinx/files/patch-src-libsphinx2fe_fe_sigproc.c b/audio/sphinx/files/patch-src-libsphinx2fe_fe_sigproc.c deleted file mode 100644 index 20c16850739b..000000000000 --- a/audio/sphinx/files/patch-src-libsphinx2fe_fe_sigproc.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/libsphinx2fe/fe_sigproc.c.orig 2007-12-06 18:34:10.000000000 +0100 -+++ src/libsphinx2fe/fe_sigproc.c 2007-12-06 18:34:25.000000000 +0100 -@@ -43,7 +43,7 @@ - - #ifndef M_PI - #define M_PI (3.14159265358979323846) --#endif M_PI -+#endif - - #define FORWARD_FFT 1 - #define INVERSE_FFT -1 diff --git a/audio/sphinx/files/patch-src-examples_clicore.c b/audio/sphinx/files/patch-src_examples_clicore.c similarity index 65% rename from audio/sphinx/files/patch-src-examples_clicore.c rename to audio/sphinx/files/patch-src_examples_clicore.c index 1013ddc46861..e842c15fe771 100644 --- a/audio/sphinx/files/patch-src-examples_clicore.c +++ b/audio/sphinx/files/patch-src_examples_clicore.c @@ -1,11 +1,11 @@ ---- src/examples/clicore.c.orig 2007-12-06 18:36:24.000000000 +0100 -+++ src/examples/clicore.c 2007-12-06 18:36:39.000000000 +0100 -@@ -323,7 +323,7 @@ +--- src/examples/clicore.c.orig 2001-12-13 21:11:13 UTC ++++ src/examples/clicore.c +@@ -323,7 +323,7 @@ SOCKET cli_open (char *hostname, int32 p memcpy (&addr.sin_addr, hp->h_addr, hp->h_length); addr.sin_port = htons((u_short) port); - if (connect (conn_sd, &addr, sizeof(addr)) == 0) + if (connect (conn_sd, (struct sockaddr *)&addr, sizeof(addr)) == 0) break; print_errno ("connect"); cli_close (conn_sd); diff --git a/audio/sphinx/files/patch-src-examples_srvcore.c b/audio/sphinx/files/patch-src_examples_srvcore.c similarity index 69% rename from audio/sphinx/files/patch-src-examples_srvcore.c rename to audio/sphinx/files/patch-src_examples_srvcore.c index 56fc3511d83b..64194468b326 100644 --- a/audio/sphinx/files/patch-src-examples_srvcore.c +++ b/audio/sphinx/files/patch-src_examples_srvcore.c @@ -1,11 +1,11 @@ ---- src/examples/srvcore.c.orig 2007-12-06 18:35:25.000000000 +0100 -+++ src/examples/srvcore.c 2007-12-06 18:35:56.000000000 +0100 -@@ -381,7 +381,7 @@ +--- src/examples/srvcore.c.orig 2001-12-13 21:11:15 UTC ++++ src/examples/srvcore.c +@@ -381,7 +381,7 @@ SOCKET server_await_conn ( void ) ERRLOG((stderr, "%s(%d): Listening at port %d\n", __FILE__, __LINE__, bindport)); - if ((conn_sd = accept (listen_sd, &address, &address_len)) == INVALID_SOCKET) { + if ((conn_sd = accept (listen_sd, (struct sockaddr *)&address, &address_len)) == INVALID_SOCKET) { print_errno ("conn_accept"); return INVALID_SOCKET; } diff --git a/audio/sphinx/files/patch-src_examples_tty-continuous.c b/audio/sphinx/files/patch-src_examples_tty-continuous.c index d3d33a53aaff..78652fcd3235 100644 --- a/audio/sphinx/files/patch-src_examples_tty-continuous.c +++ b/audio/sphinx/files/patch-src_examples_tty-continuous.c @@ -1,12 +1,12 @@ author: Andriy Gapon ---- src/examples/tty-continuous.c.orig Thu Dec 13 21:11:15 2001 -+++ src/examples/tty-continuous.c Mon Oct 20 12:12:58 2003 +--- src/examples/tty-continuous.c.orig 2001-12-13 21:11:15 UTC ++++ src/examples/tty-continuous.c @@ -175,7 +175,6 @@ static void utterance_loop() * listening until current utterance completely decoded */ ad_stop_rec (ad); - while (ad_read (ad, adbuf, 4096) >= 0); cont_ad_reset (cont); printf ("Stopped listening, please wait...\n"); fflush (stdout); diff --git a/audio/sphinx/files/patch-src-libsphinx2_blk_cdcn_norm.c b/audio/sphinx/files/patch-src_libsphinx2_blk__cdcn__norm.c similarity index 86% rename from audio/sphinx/files/patch-src-libsphinx2_blk_cdcn_norm.c rename to audio/sphinx/files/patch-src_libsphinx2_blk__cdcn__norm.c index 90a67a62cf1b..21f15e5afc35 100644 --- a/audio/sphinx/files/patch-src-libsphinx2_blk_cdcn_norm.c +++ b/audio/sphinx/files/patch-src_libsphinx2_blk__cdcn__norm.c @@ -1,37 +1,37 @@ ---- src/libsphinx2/blk_cdcn_norm.c.orig 2007-12-06 19:23:43.000000000 +0100 -+++ src/libsphinx2/blk_cdcn_norm.c 2007-12-06 19:23:25.000000000 +0100 +--- src/libsphinx2/blk_cdcn_norm.c.orig 2001-12-13 21:11:20 UTC ++++ src/libsphinx2/blk_cdcn_norm.c @@ -36,6 +36,18 @@ #include #include "cdcn.h" +static void +block_actual_cdcn_norm(float variance[][NUM_COEFF+1], /* Speech cepstral variances of modes */ + float *prob, /* Ratio of a-prori mode probs. to mod variance */ + float *tilt, /* Spectral tilt cepstrum */ + float *noise, /* Noise estimate */ + float means[][NUM_COEFF+1], /* The cepstrum codebook */ + float corrbook[][NUM_COEFF+1], /* The correction factor's codebook */ + int num_codes, /* Number of codewords in codebook */ + float z[][NUM_COEFF+1], /* The input cepstrum */ + int num_frames); /* Number of frames in utterance */ + + /************************************************************************ * Dummy routine to convert from suitcase to sane varibles ***************************************************************************/ -@@ -46,7 +58,6 @@ +@@ -46,7 +58,6 @@ void block_cdcn_norm (float z[][NUM_COEF { /* Multidimensional arrays in C suck, so we have to forward-declare-hack this. */ - static void block_actual_cdcn_norm(); float *variance, *prob, *tilt, *noise, *codebook, *corrbook; int num_codes; -@@ -88,7 +99,6 @@ +@@ -88,7 +99,6 @@ void block_cdcn_norm (float z[][NUM_COEF * Coded by Alex Acero (acero@s), November 1989 * *************************************************************************/ - static void block_actual_cdcn_norm(float variance[][NUM_COEFF+1], /* Speech cepstral variances of modes */ float *prob, /* Ratio of a-prori mode probs. to mod variance */ diff --git a/audio/sphinx/files/patch-src-libsphinx2_cdcn_norm.c b/audio/sphinx/files/patch-src_libsphinx2_cdcn__norm.c similarity index 87% rename from audio/sphinx/files/patch-src-libsphinx2_cdcn_norm.c rename to audio/sphinx/files/patch-src_libsphinx2_cdcn__norm.c index df6ab3080271..bb94530dcf6a 100644 --- a/audio/sphinx/files/patch-src-libsphinx2_cdcn_norm.c +++ b/audio/sphinx/files/patch-src_libsphinx2_cdcn__norm.c @@ -1,27 +1,27 @@ ---- src/libsphinx2/cdcn_norm.c.orig 2007-12-06 19:24:33.000000000 +0100 -+++ src/libsphinx2/cdcn_norm.c 2007-12-06 19:26:24.000000000 +0100 +--- src/libsphinx2/cdcn_norm.c.orig 2001-12-13 21:11:20 UTC ++++ src/libsphinx2/cdcn_norm.c @@ -35,6 +35,15 @@ */ #include #include "cdcn.h" +static void +actual_cdcn_norm(float variance[][NUM_COEFF+1], /* Speech cepstral variances of modes */ + float *prob, /* Ratio of a-prori mode probs. to mod variance */ + float *tilt, /* Spectral tilt cepstrum */ + float *noise, /* Noise estimate */ + float means[][NUM_COEFF+1], /* The cepstrum codebook */ + float corrbook[][NUM_COEFF+1], /* The correction factor's codebook */ + int num_codes, /* Number of codewords in codebook */ + float z[NUM_COEFF+1]); /* The input cepstrum */ /************************************************************************ * Dummy routine to convert from suitcase to sane varibles @@ -43,8 +52,6 @@ void cdcn_norm (float z[NUM_COEFF+1], /* The input cepstrum */ CDCN_type *cdcn_variables) { - /* Multidimensional arrays, yuck. */ - static void actual_cdcn_norm(); float *variance, *prob, *tilt, *noise, *codebook, *corrbook; int num_codes; diff --git a/audio/sphinx/files/patch-src_libsphinx2_cdcn_update.c b/audio/sphinx/files/patch-src_libsphinx2_cdcn__update.c similarity index 86% rename from audio/sphinx/files/patch-src_libsphinx2_cdcn_update.c rename to audio/sphinx/files/patch-src_libsphinx2_cdcn__update.c index 5d1168421715..b457815cc1ed 100644 --- a/audio/sphinx/files/patch-src_libsphinx2_cdcn_update.c +++ b/audio/sphinx/files/patch-src_libsphinx2_cdcn__update.c @@ -1,29 +1,29 @@ ---- src/libsphinx2/cdcn_update.c.orig 2001-12-13 22:11:20.000000000 +0100 -+++ src/libsphinx2/cdcn_update.c 2007-12-06 19:40:02.000000000 +0100 +--- src/libsphinx2/cdcn_update.c.orig 2001-12-13 21:11:20 UTC ++++ src/libsphinx2/cdcn_update.c @@ -47,6 +47,11 @@ * Modified by Uday Jain, June 95 * *************************************************************************/ +static float initialize (float [][NUM_COEFF+1], int, float *, float *, float, + float [][NUM_COEFF+1], float *, float [][NUM_COEFF+1], int); +static void correction(float *, float *, float *, float *, int); +static float max_q (float *, float *, float *, float *, float *, + float *, int, float *, int); float cdcn_update (float *z, /* The observed cepstrum vectors */ -@@ -56,13 +61,7 @@ +@@ -56,13 +61,7 @@ cdcn_update (float *z, /* The observed float distortion; float *noise, *tilt, *codebook, *prob, *variance, *corrbook; int num_codes; - /* Multidimensional arrays, gar gar gar */ - static float initialize (float *, int, float *, float *, float, - float *, float *, float *, int); - static void correction(float *, float *, float *, float *, int); - static float max_q (float *, float *, float *, float *, float *, - float *, int, float *, int); - + /* * If error, dont bother */ diff --git a/audio/sphinx/files/patch-src_libsphinx2_eht__quit.c b/audio/sphinx/files/patch-src_libsphinx2_eht__quit.c new file mode 100644 index 000000000000..f545fff4e4ef --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2_eht__quit.c @@ -0,0 +1,10 @@ +--- src/libsphinx2/eht_quit.c.orig 2001-12-13 21:11:20 UTC ++++ src/libsphinx2/eht_quit.c +@@ -85,6 +85,7 @@ + */ + + #include ++#include + #include + + void diff --git a/audio/sphinx/files/patch-src-libsphinx2_err.c b/audio/sphinx/files/patch-src_libsphinx2_err.c similarity index 51% rename from audio/sphinx/files/patch-src-libsphinx2_err.c rename to audio/sphinx/files/patch-src_libsphinx2_err.c index 84d9d2fb6aa8..5c654b575287 100644 --- a/audio/sphinx/files/patch-src-libsphinx2_err.c +++ b/audio/sphinx/files/patch-src_libsphinx2_err.c @@ -1,10 +1,10 @@ ---- src/libsphinx2/err.c.orig 2007-12-06 18:22:49.000000000 +0100 -+++ src/libsphinx2/err.c 2007-12-06 18:23:27.000000000 +0100 +--- src/libsphinx2/err.c.orig 2001-12-13 21:11:20 UTC ++++ src/libsphinx2/err.c @@ -49,6 +49,7 @@ */ #include +#include #if ((! WIN32) && (! _SGI_SOURCE)) #include #else diff --git a/audio/sphinx/files/patch-src_libsphinx2_include_pconf.h b/audio/sphinx/files/patch-src_libsphinx2_include_pconf.h new file mode 100644 index 000000000000..1a89cbebd6fa --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2_include_pconf.h @@ -0,0 +1,8 @@ +--- src/libsphinx2/include/pconf.h.orig 2001-12-13 21:11:27 UTC ++++ src/libsphinx2/include/pconf.h +@@ -124,4 +124,4 @@ int ppconf(int argc, char *argv[], + char * (*GetDefault)(char const *, char const *), char last); + void pusage(char *prog, Config_t *cp); + +-#endif _PCONF_ ++#endif diff --git a/audio/sphinx/files/patch-src-libsphinx2_linklist.c b/audio/sphinx/files/patch-src_libsphinx2_linklist.c similarity index 68% rename from audio/sphinx/files/patch-src-libsphinx2_linklist.c rename to audio/sphinx/files/patch-src_libsphinx2_linklist.c index c6f3eb4c5692..d8816d04b6e7 100644 --- a/audio/sphinx/files/patch-src-libsphinx2_linklist.c +++ b/audio/sphinx/files/patch-src_libsphinx2_linklist.c @@ -1,19 +1,19 @@ ---- src/libsphinx2/linklist.c.orig 2007-12-06 18:25:48.000000000 +0100 -+++ src/libsphinx2/linklist.c 2007-12-06 18:27:00.000000000 +0100 +--- src/libsphinx2/linklist.c.orig 2001-12-13 21:11:22 UTC ++++ src/libsphinx2/linklist.c @@ -81,7 +81,6 @@ #include #include -#include #include "s2types.h" -@@ -132,7 +131,7 @@ +@@ -132,7 +131,7 @@ void *listelem_alloc (int32 elem_size) cpp = list[i].freelist = (void **) malloc (list[i].n_malloc * elem_size); cp = (void *) cpp; for (j = list[i].n_malloc-1; j > 0; --j) { - (char*)cp += elem_size; + cp += elem_size; *cpp = cp; cpp = (void **)cp; } diff --git a/audio/sphinx/files/patch-src_libsphinx2_prime.c b/audio/sphinx/files/patch-src_libsphinx2_prime.c new file mode 100644 index 000000000000..10bb7ff70b76 --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2_prime.c @@ -0,0 +1,9 @@ +--- src/libsphinx2/prime.c.orig 2001-12-13 21:11:23 UTC ++++ src/libsphinx2/prime.c +@@ -75,5 +75,4 @@ main () + } + } + +-#endif MAIN +- ++#endif diff --git a/audio/sphinx/files/patch-src_libsphinx2_r__agc__noise.c b/audio/sphinx/files/patch-src_libsphinx2_r__agc__noise.c new file mode 100644 index 000000000000..4050c77e96d7 --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2_r__agc__noise.c @@ -0,0 +1,10 @@ +--- src/libsphinx2/r_agc_noise.c.orig 2001-12-13 21:11:23 UTC ++++ src/libsphinx2/r_agc_noise.c +@@ -34,6 +34,7 @@ + * + */ + #include ++#include + + #include "s2types.h" + #include "c.h" diff --git a/audio/sphinx/files/patch-src_libsphinx2_sc__vq.c b/audio/sphinx/files/patch-src_libsphinx2_sc__vq.c new file mode 100644 index 000000000000..a687843c24b2 --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2_sc__vq.c @@ -0,0 +1,10 @@ +--- src/libsphinx2/sc_vq.c.orig 2001-12-13 21:11:23 UTC ++++ src/libsphinx2/sc_vq.c +@@ -64,6 +64,7 @@ + + #include + #include ++#include + #include + #include + diff --git a/audio/sphinx/files/patch-src-libsphinx2_search.c b/audio/sphinx/files/patch-src_libsphinx2_search.c similarity index 72% rename from audio/sphinx/files/patch-src-libsphinx2_search.c rename to audio/sphinx/files/patch-src_libsphinx2_search.c index 1d6f423d4bcf..69e5c737e849 100644 --- a/audio/sphinx/files/patch-src-libsphinx2_search.c +++ b/audio/sphinx/files/patch-src_libsphinx2_search.c @@ -1,28 +1,28 @@ ---- src/libsphinx2/search.c.orig 2007-12-06 18:29:23.000000000 +0100 -+++ src/libsphinx2/search.c 2007-12-06 18:33:21.000000000 +0100 -@@ -2236,6 +2236,9 @@ +--- src/libsphinx2/search.c.orig 2001-12-13 21:11:24 UTC ++++ src/libsphinx2/search.c +@@ -2236,6 +2236,9 @@ search_one_ply_fwd (void) lm_next_frame (); } +static void compute_phone_perplexity( void ); +static search_hyp_t *fwdtree_pscr_path ( void ); + void search_finish_fwd (void) { -@@ -2245,7 +2248,6 @@ +@@ -2245,7 +2248,6 @@ search_finish_fwd (void) CHAN_T *hmm, /* *thmm,*/ **acl; /* int32 bp, bestbp, bestscore; */ /* int32 l_scr; */ - static void compute_phone_perplexity( void ); if ((CurrentFrame > 0) && (topsen_window > 1)) { /* Wind up remaining frames */ -@@ -2306,7 +2308,6 @@ +@@ -2306,7 +2308,6 @@ search_finish_fwd (void) /* Get pscr-score for fwdtree recognition */ { search_hyp_t *pscrpath; - static search_hyp_t *fwdtree_pscr_path ( void ); if (query_phone_conf ()) { pscrpath = fwdtree_pscr_path (); diff --git a/audio/sphinx/files/patch-src_libsphinx2ad_ad_oss_bsd.c b/audio/sphinx/files/patch-src_libsphinx2ad_ad__oss__bsd.c similarity index 90% rename from audio/sphinx/files/patch-src_libsphinx2ad_ad_oss_bsd.c rename to audio/sphinx/files/patch-src_libsphinx2ad_ad__oss__bsd.c index 959b25d4febd..90f9eb75ffc0 100644 --- a/audio/sphinx/files/patch-src_libsphinx2ad_ad_oss_bsd.c +++ b/audio/sphinx/files/patch-src_libsphinx2ad_ad__oss__bsd.c @@ -1,209 +1,209 @@ author: Andriy Gapon ---- src/libsphinx2ad/ad_oss_bsd.c.orig Thu Dec 13 21:11:27 2001 -+++ src/libsphinx2ad/ad_oss_bsd.c Fri Oct 24 04:11:22 2003 +--- src/libsphinx2ad/ad_oss_bsd.c.orig 2001-12-13 21:11:27 UTC ++++ src/libsphinx2ad/ad_oss_bsd.c @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include "s2types.h" @@ -72,14 +72,11 @@ #define SPS_EPSILON 200 -#ifndef SNDCTL_DSP_SETDUPLEX -#define SNDCTL_DSP_SETDUPLEX -1 -#endif ad_rec_t *ad_open_sps (int32 sps) { ad_rec_t *handle; int32 dspFD, mixerFD; - int32 nonBlocking=1, sourceMic=1, inputGain=INPUT_GAIN; + int32 sourceMic=1, inputGain=INPUT_GAIN; int32 audioFormat=AUDIO_FORMAT; int32 dspCaps=0; int32 sampleRate; -@@ -96,7 +93,6 @@ +@@ -96,7 +93,6 @@ ad_rec_t *ad_open_sps (int32 sps) { } sampleRate = sps; - /* Used to have O_NDELAY. */ if((dspFD = open ("/dev/dsp", O_RDONLY))<0){ if (errno == EBUSY) fprintf(stderr, "Audio device busy\n"); -@@ -105,18 +101,6 @@ +@@ -105,18 +101,6 @@ ad_rec_t *ad_open_sps (int32 sps) { return NULL; } - if (ioctl (dspFD, SNDCTL_DSP_SYNC, 0) < 0){ - fprintf(stderr, "Audio ioctl(SYNC) failed: %s\n", strerror(errno)); - close (dspFD); - return NULL; - } - - if (ioctl (dspFD, SNDCTL_DSP_RESET, 0) < 0){ - fprintf(stderr, "Audio ioctl(RESET) failed: %s\n", strerror(errno)); - close (dspFD); - return NULL; - } - if (ioctl (dspFD, SNDCTL_DSP_SETFMT, &audioFormat) < 0){ fprintf(stderr, "Audio ioctl(SETFMT 0x%x) failed: %s\n", audioFormat, strerror(errno)); close (dspFD); -@@ -139,12 +123,6 @@ +@@ -139,12 +123,6 @@ ad_rec_t *ad_open_sps (int32 sps) { return NULL; } - if (ioctl (dspFD, SNDCTL_DSP_NONBLOCK, &nonBlocking) < 0) { - fprintf(stderr, "ioctl(NONBLOCK) failed: %s\n", strerror(errno)); - close (dspFD); - return NULL; - } - if (ioctl (dspFD, SNDCTL_DSP_GETCAPS, &dspCaps) < 0) { fprintf(stderr, "ioctl(GETCAPS) failed: %s\n", strerror(errno)); close (dspFD); -@@ -161,8 +139,6 @@ +@@ -161,8 +139,6 @@ ad_rec_t *ad_open_sps (int32 sps) { printf("DSP %s memory map capability.\n", (dspCaps&DSP_CAP_MMAP)?"has":"does not have"); #endif - if ((dspCaps & DSP_CAP_DUPLEX) && (ioctl (dspFD, SNDCTL_DSP_SETDUPLEX, 0) < 0)) - fprintf(stderr, "ioctl(SETDUPLEX) failed: %s\n", strerror(errno)); /* Patched by N. Roy (nickr@ri.cmu.edu), 99/7/23. Previously, mixer was set through dspFD. This is incorrect. Should -@@ -210,10 +186,10 @@ +@@ -210,10 +186,10 @@ ad_rec_t *ad_open_sps (int32 sps) { } handle->dspFD = dspFD; - handle->recording = 0; handle->sps = sps; handle->bps = sizeof(int16); - + handle->recording = 1; + return(handle); } -@@ -224,15 +200,10 @@ +@@ -224,15 +200,10 @@ ad_rec_t *ad_open ( void ) int32 ad_close (ad_rec_t *handle) { - if (handle->dspFD < 0) - return AD_ERR_NOT_OPEN; - if (handle->recording) { - if (ad_stop_rec (handle) < 0) - return AD_ERR_GEN; + ad_stop_rec (handle); } - close (handle->dspFD); free(handle); return(0); -@@ -240,48 +211,62 @@ +@@ -240,48 +211,62 @@ int32 ad_close (ad_rec_t *handle) int32 ad_start_rec (ad_rec_t *handle) { - if (handle->dspFD < 0) - return AD_ERR_NOT_OPEN; - - if (handle->recording) - return AD_ERR_GEN; + + if (!handle->recording) { + + int32 dspFD; + int32 audioFormat=AUDIO_FORMAT; + int32 sampleRate=handle->sps; + + if((dspFD = open ("/dev/dsp", O_RDONLY))<0){ + if (errno == EBUSY) + fprintf(stderr, "Audio device busy\n"); + else + fprintf(stderr, "Failed to open audio device: %s\n", strerror(errno)); + return AD_ERR_GEN; + } - /* Sample rate, format, input mix settings, &c. are configured - * with ioctl(2) calls under Linux. It makes more sense to handle - * these at device open time and consider the state of the device - * to be fixed until closed. - */ + if (ioctl (dspFD, SNDCTL_DSP_SETFMT, &audioFormat) < 0){ + fprintf(stderr, "Audio ioctl(SETFMT 0x%x) failed: %s\n", audioFormat, strerror(errno)); + close (dspFD); + return AD_ERR_GEN; + } + if (audioFormat != AUDIO_FORMAT) { + fprintf(stderr, "Audio ioctl(SETFMT): 0x%x, expected: 0x%x\n", audioFormat, AUDIO_FORMAT); + close (dspFD); + return AD_ERR_GEN; + } - handle->recording = 1; - - /* rkm@cs: This doesn't actually do anything. How do we turn recording on/off? */ + if (ioctl (dspFD, SNDCTL_DSP_SPEED, &sampleRate) < 0) { + fprintf(stderr, "Audio ioctl(SPEED %d) failed %s\n", sampleRate, strerror(errno)); + close (dspFD); + return AD_ERR_GEN; + } + if (sampleRate != handle->sps) { + fprintf(stderr, "Audio ioctl(SPEED): %d, expected: %d\n", sampleRate, handle->sps); + close (dspFD); + return AD_ERR_GEN; + } + handle->dspFD = dspFD; + handle->recording = 1; + } return(0); } int32 ad_stop_rec (ad_rec_t *handle) { - if (handle->dspFD < 0) - return AD_ERR_NOT_OPEN; - - if (! handle->recording) - return AD_ERR_GEN; - - if (ioctl (handle->dspFD, SNDCTL_DSP_SYNC, 0) < 0) { - fprintf(stderr, "Audio ioctl(SYNC) failed: %s\n", strerror(errno)); - return AD_ERR_GEN; - } - - handle->recording = 0; - + if (handle->recording) { + close (handle->dspFD); + handle->dspFD = -1; + handle->recording = 0; + } return (0); } int32 ad_read (ad_rec_t *handle, int16 *buf, int32 max) { - int32 length; - - length = max * handle->bps; /* #samples -> #bytes */ + int32 length = max * handle->bps; /* #samples -> #bytes */ if ((length = read (handle->dspFD, buf, length)) > 0) { #if 0 -@@ -292,7 +277,7 @@ +@@ -292,7 +277,7 @@ int32 ad_read (ad_rec_t *handle, int16 * } if (length < 0) { - fprintf(stderr, "Audio read error\n"); + perror("Audio read error"); return AD_ERR_GEN; } diff --git a/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c b/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c new file mode 100644 index 000000000000..07f62d27a087 --- /dev/null +++ b/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c @@ -0,0 +1,11 @@ +--- src/libsphinx2fe/fe_sigproc.c.orig 2016-06-20 13:31:26 UTC ++++ src/libsphinx2fe/fe_sigproc.c +@@ -43,7 +43,7 @@ + + #ifndef M_PI + #define M_PI (3.14159265358979323846) +-#endif M_PI ++#endif + + #define FORWARD_FFT 1 + #define INVERSE_FFT -1 diff --git a/benchmarks/himenobench/Makefile b/benchmarks/himenobench/Makefile index fbe39defe14f..a639be3fe742 100644 --- a/benchmarks/himenobench/Makefile +++ b/benchmarks/himenobench/Makefile @@ -1,84 +1,85 @@ # Created by: NAKATA Maho # $FreeBSD$ PORTNAME= himenobench PORTVERSION= 2015.07.09 CATEGORIES= benchmarks MASTER_SITES= http://accc.riken.jp/wp-content/uploads/2015/07/ DISTFILES= himenobmtxp_xl.zip himenobmtxp_l.zip \ himenobmtxp_m.zip himenobmtxp_s.zip \ cc_himenobmtxp_xl.zip cc_himenobmtxp_l.zip \ cc_himenobmtxp_m.zip cc_himenobmtxp_s.zip \ f90_xp.zip himenobmtxpa.zip DIST_SUBDIR= himeno MAINTAINER= ports@FreeBSD.org COMMENT= Tool for measureing performance of floating point operation LICENSE= LGPL20 # (or later) EXTRACT_DEPENDS= lha:archivers/lha -USES= fortran zip +USES= dos2unix fortran zip +DOS2UNIX_GLOB= *.c *.f NO_WRKSUBDIR= yes OPTIONS_DEFINE= ICC OPTIMIZED_CFLAGS OPTIONS_SUB= yes ICC_DESC= Intel C compiler support ICC_BUILD_DEPENDS= ${LOCALBASE}/intel_cc_80/bin/icc:lang/icc OPTIMIZED_CFLAGS_CFLAGS=${OPTFLAGS} OPTIMIZED_CFLAGS_VARS= FFLAGS+="${OPTFLAGS}" ICC= ${LOCALBASE}/intel_cc_80/bin/icc CFLAGS_ICC= -O3 -tpp7 -axN -Vaxlib OPTFLAGS= -O2 -ffast-math -finline-functions -fomit-frame-pointer \ -funroll-loops -fexpensive-optimizations post-extract: @${FIND} ${WRKSRC} -name "*.lzh" -type f -maxdepth 1 -exec lha \ xfpw=${WRKSRC} {} \; do-build: # cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_xl himenobmtxp_xl.f #Too large cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_l himenobmtxp_l.f cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_m himenobmtxp_m.f cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_s himenobmtxp_s.f # cd ${WRKSRC} ; ${CC} ${CFLAGS} -DELARGE -o himenobmtxps_xl himenobmtxps.c #Too large cd ${WRKSRC} ; ${CC} ${CFLAGS} -DLARGE -o himenobmtxps_l himenobmtxps.c cd ${WRKSRC} ; ${CC} ${CFLAGS} -DMIDDLE -o himenobmtxps_m himenobmtxps.c cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSMALL -o himenobmtxps_s himenobmtxps.c cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSSMALL -o himenobmtxps_ss himenobmtxps.c cd ${WRKSRC} ; ${CC} ${CFLAGS} -o himenobmtxpa himenobmtxpa.c cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp himenobmtxp.f90 do-build-ICC-on: # cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DELARGE -o himenobmtxps_xl.icc himenobmtxps.c #Too large cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DLARGE -o himenobmtxps_l.icc himenobmtxps.c cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DMIDDLE -o himenobmtxps_m.icc himenobmtxps.c cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSMALL -o himenobmtxps_s.icc himenobmtxps.c cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSSMALL -o himenobmtxps_ss.icc himenobmtxps.c cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -o himenobmtxpa.icc himenobmtxpa.c do-install: # ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_xl ${STAGEDIR}${PREFIX}/bin #Too large ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_l ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_m ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_s ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxpa ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_l ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_m ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_s ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_ss ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp ${STAGEDIR}${PREFIX}/bin do-install-ICC-on: # ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_xl.icc ${STAGEDIR}${PREFIX}/bin #Too large ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_l.icc ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_m.icc ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_s.icc ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxps_ss.icc ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxpa.icc ${STAGEDIR}${PREFIX}/bin .include diff --git a/benchmarks/himenobench/files/patch-himenobmtxp__l.f b/benchmarks/himenobench/files/patch-himenobmtxp__l.f index 6605b98cc49b..855e8bff2f52 100644 --- a/benchmarks/himenobench/files/patch-himenobmtxp__l.f +++ b/benchmarks/himenobench/files/patch-himenobmtxp__l.f @@ -1,10 +1,10 @@ ---- himenobmtxp_l.f.orig 2002-01-07 04:54:46 UTC +--- himenobmtxp_l.f.orig 2016-06-20 13:01:22 UTC +++ himenobmtxp_l.f -@@ -39,7 +39,6 @@ C ------------------- - C "use portlib" statement on the next line is for Visual fortran - C to use UNIX libraries. Please remove it if your system is UNIX. - C ------------------- -- use portlib - IMPLICIT REAL*4(a-h,o-z) - C - PARAMETER (mimax=513,mjmax=257,mkmax=257) +@@ -39,7 +39,6 @@ C ------------------- + C "use portlib" statement on the next line is for Visual fortran + C to use UNIX libraries. Please remove it if your system is UNIX. + C ------------------- +- use portlib + IMPLICIT REAL*4(a-h,o-z) + C + PARAMETER (mimax=513,mjmax=257,mkmax=257) diff --git a/benchmarks/himenobench/files/patch-himenobmtxp__m.f b/benchmarks/himenobench/files/patch-himenobmtxp__m.f index 7aaf759c4d14..97ddd3f1a023 100644 --- a/benchmarks/himenobench/files/patch-himenobmtxp__m.f +++ b/benchmarks/himenobench/files/patch-himenobmtxp__m.f @@ -1,10 +1,10 @@ ---- himenobmtxp_m.f.orig 2002-01-07 04:54:48 UTC +--- himenobmtxp_m.f.orig 2016-06-20 13:01:22 UTC +++ himenobmtxp_m.f -@@ -39,7 +39,6 @@ C ------------------- - C "use portlib" statement on the next line is for Visual fortran - C to use UNIX libraries. Please remove it if your system is UNIX. - C ------------------- -- use portlib - IMPLICIT REAL*4(a-h,o-z) - C - C PARAMETER (mimax=513,mjmax=257,mkmax=257) +@@ -39,7 +39,6 @@ C ------------------- + C "use portlib" statement on the next line is for Visual fortran + C to use UNIX libraries. Please remove it if your system is UNIX. + C ------------------- +- use portlib + IMPLICIT REAL*4(a-h,o-z) + C + C PARAMETER (mimax=513,mjmax=257,mkmax=257) diff --git a/benchmarks/himenobench/files/patch-himenobmtxp__s.f b/benchmarks/himenobench/files/patch-himenobmtxp__s.f index 60ffa1510c0b..cea8df8726fa 100644 --- a/benchmarks/himenobench/files/patch-himenobmtxp__s.f +++ b/benchmarks/himenobench/files/patch-himenobmtxp__s.f @@ -1,10 +1,10 @@ ---- himenobmtxp_s.f.orig 2001-12-17 07:45:16 UTC +--- himenobmtxp_s.f.orig 2016-06-20 13:01:22 UTC +++ himenobmtxp_s.f -@@ -39,7 +39,6 @@ C ------------------- - C "use portlib" statement on the next line is for Visual fortran - C to use UNIX libraries. Please remove it if your system is UNIX. - C ------------------- -- use portlib - IMPLICIT REAL*4(a-h,o-z) - C - C PARAMETER (mimax=513,mjmax=257,mkmax=257) +@@ -39,7 +39,6 @@ C ------------------- + C "use portlib" statement on the next line is for Visual fortran + C to use UNIX libraries. Please remove it if your system is UNIX. + C ------------------- +- use portlib + IMPLICIT REAL*4(a-h,o-z) + C + C PARAMETER (mimax=513,mjmax=257,mkmax=257) diff --git a/benchmarks/himenobench/files/patch-himenobmtxp__xl.f b/benchmarks/himenobench/files/patch-himenobmtxp__xl.f index 3125952c1d5e..f71a582d45ec 100644 --- a/benchmarks/himenobench/files/patch-himenobmtxp__xl.f +++ b/benchmarks/himenobench/files/patch-himenobmtxp__xl.f @@ -1,10 +1,10 @@ ---- himenobmtxp_xl.f.orig 2002-01-07 04:54:42 UTC +--- himenobmtxp_xl.f.orig 2016-06-20 13:01:22 UTC +++ himenobmtxp_xl.f -@@ -39,7 +39,6 @@ C ------------------- - C "use portlib" statement on the next line is for Visual fortran - C to use UNIX libraries. Please remove it if your system is UNIX. - C ------------------- -- use portlib - IMPLICIT REAL*4(a-h,o-z) - C - PARAMETER (mimax=1025,mjmax=513,mkmax=513) +@@ -39,7 +39,6 @@ C ------------------- + C "use portlib" statement on the next line is for Visual fortran + C to use UNIX libraries. Please remove it if your system is UNIX. + C ------------------- +- use portlib + IMPLICIT REAL*4(a-h,o-z) + C + PARAMETER (mimax=1025,mjmax=513,mkmax=513) diff --git a/benchmarks/himenobench/files/patch-himenobmtxps.c b/benchmarks/himenobench/files/patch-himenobmtxps.c index 175cf050112d..b00ab89328ae 100644 --- a/benchmarks/himenobench/files/patch-himenobmtxps.c +++ b/benchmarks/himenobench/files/patch-himenobmtxps.c @@ -1,18 +1,18 @@ ---- himenobmtxps.c.orig 2002-02-21 00:27:48 UTC +--- himenobmtxps.c.orig 2016-06-20 13:01:22 UTC +++ himenobmtxps.c @@ -37,6 +37,7 @@ - ********************************************************************/ - - #include -+#include - - #ifdef SSMALL - #define MIMAX 33 -@@ -245,7 +246,6 @@ mflops(int nn,double cpu,double flop) - double - second() - { --#include - - struct timeval tm; - double t ; + ********************************************************************/ + + #include ++#include + + #ifdef SSMALL + #define MIMAX 33 +@@ -245,7 +246,6 @@ mflops(int nn,double cpu,double flop) + double + second() + { +-#include + + struct timeval tm; + double t ; diff --git a/benchmarks/netio/Makefile b/benchmarks/netio/Makefile index 9f31a8092a35..02848c9c6336 100644 --- a/benchmarks/netio/Makefile +++ b/benchmarks/netio/Makefile @@ -1,37 +1,37 @@ # Created by: arved # $FreeBSD$ PORTNAME= netio PORTVERSION= 1.32 CATEGORIES= benchmarks net ipv6 MASTER_SITES= LOCAL/arved DISTNAME= netio132 MAINTAINER= arved@FreeBSD.org COMMENT= Network benchmark WRKSRC= ${WRKDIR} -USES= gmake zip -PATCH_ARGS= -d ${PATCH_WRKSRC} -N -s -E ${PATCH_STRIP} -l +USES= dos2unix gmake zip +DOS2UNIX_FILES= Makefile netio.c PLIST_FILES= bin/netio CFLAGS+= -DUNIX -DSOCKLEN_T LIBS+= -pthread MAKE_ENV+= OUT=-o OPTIONS_DEFINE= IPV6 IPV6_PLIST_FILES= bin/netio6 do-build: @(cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} O=.o CFLAGS="${CFLAGS}" ${MAKE_CMD} all) do-build-IPV6-on: @(cd ${WRKSRC} && \ ${MAKE_ENV} O=.6o X=6 CFLAGS="${CFLAGS} -DUSE_IPV6" ${MAKE_CMD} all) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/netio ${STAGEDIR}${PREFIX}/bin do-install-IPV6-on: ${INSTALL_PROGRAM} ${WRKSRC}/netio6 ${STAGEDIR}${PREFIX}/bin .include diff --git a/benchmarks/netio/files/patch-Makefile b/benchmarks/netio/files/patch-Makefile index 364e94f9146c..5341e76d056f 100644 --- a/benchmarks/netio/files/patch-Makefile +++ b/benchmarks/netio/files/patch-Makefile @@ -1,11 +1,11 @@ ---- Makefile.orig Sat Sep 2 13:27:40 2006 -+++ Makefile Sat Sep 2 13:29:30 2006 -@@ -96,7 +96,7 @@ - - .SUFFIXES: .c $O - .c$O: -- $(CC) $(CFLAGS) $(INC) -c $*.c -+ $(CC) $(OUT) $@ $(CFLAGS) $(INC) -c $*.c - - netio$O: netio.c netbios.h getopt.h - netbios$O: netbios.c netbios.h +--- Makefile.orig 2016-06-20 13:21:43 UTC ++++ Makefile +@@ -102,7 +102,7 @@ netio$X: netio$O getopt$O + + .SUFFIXES: .c $O + .c$O: +- $(CC) $(CFLAGS) $(INC) -c $*.c ++ $(CC) $(OUT) $@ $(CFLAGS) $(INC) -c $*.c + + netio$O: netio.c getopt.h + getopt$O: getopt.c getopt.h diff --git a/benchmarks/netio/files/patch-netio.c b/benchmarks/netio/files/patch-netio.c index 2648f1222dd1..bf3c2e703ee2 100644 --- a/benchmarks/netio/files/patch-netio.c +++ b/benchmarks/netio/files/patch-netio.c @@ -1,335 +1,335 @@ ---- netio.c.orig 2012-11-22 17:47:38.000000000 +0100 -+++ netio.c 2015-03-23 11:52:42.000000000 +0100 -@@ -136,6 +136,7 @@ - #include - #include - #if defined(UNIX) || defined(DJGPP) +--- netio.c.orig 2016-06-20 13:21:43 UTC ++++ netio.c +@@ -136,6 +136,7 @@ static char *rcsrev = "$Revision: 1.32 $ + #include + #include + #if defined(UNIX) || defined(DJGPP) +#include - #include - #include - #include -@@ -546,7 +547,7 @@ - - int recv_data(int socket, void *buffer, size_t size, int flags) - { -- size_t rc = recv(socket, buffer, size, flags); + #include + #include + #include +@@ -546,7 +547,7 @@ int send_data(int socket, void *buffer, + + int recv_data(int socket, void *buffer, size_t size, int flags) + { +- size_t rc = recv(socket, buffer, size, flags); + ssize_t rc = recv(socket, buffer, size, flags); - - if (rc < 0) - { -@@ -563,8 +564,13 @@ - const int sobufsize = 131072; - int nPort = DEFAULTPORT; - int nAuxPort = DEFAULTPORT + 1; + + if (rc < 0) + { +@@ -563,8 +564,13 @@ int recv_data(int socket, void *buffer, + const int sobufsize = 131072; + int nPort = DEFAULTPORT; + int nAuxPort = DEFAULTPORT + 1; +#ifdef USE_IPV6 +struct in6_addr addr_server; +struct in6_addr addr_local; +#else - struct in_addr addr_server; - struct in_addr addr_local; + struct in_addr addr_server; + struct in_addr addr_local; +#endif - - int udpsocket, udpd; - unsigned long nUDPCount; -@@ -577,7 +583,11 @@ - TIMER nTimer; - long nTime; - long long nData; + + int udpsocket, udpd; + unsigned long nUDPCount; +@@ -577,7 +583,11 @@ THREAD TCP_Server(void *arg) + TIMER nTimer; + long nTime; + long long nData; +#ifdef USE_IPV6 + struct sockaddr_in6 sa_server, sa_client; +#else - struct sockaddr_in sa_server, sa_client; + struct sockaddr_in sa_server, sa_client; +#endif - int server, client; - socklen_type length; - struct timeval tv; -@@ -591,7 +601,11 @@ - return THREADRESULT; - } - + int server, client; + socklen_type length; + struct timeval tv; +@@ -591,7 +601,11 @@ THREAD TCP_Server(void *arg) + return THREADRESULT; + } + +#ifdef USE_IPV6 + if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0) +#else - if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) + if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) +#endif - { - psock_errno("socket()"); - free(cBuffer); -@@ -601,9 +615,15 @@ - setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); - setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); - + { + psock_errno("socket()"); + free(cBuffer); +@@ -601,9 +615,15 @@ THREAD TCP_Server(void *arg) + setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); + setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); + +#ifdef USE_IPV6 + sa_server.sin6_family = AF_INET6; + sa_server.sin6_port = htons(nPort); + sa_server.sin6_addr = addr_local; +#else - sa_server.sin_family = AF_INET; - sa_server.sin_port = htons(nPort); - sa_server.sin_addr = addr_local; + sa_server.sin_family = AF_INET; + sa_server.sin_port = htons(nPort); + sa_server.sin_addr = addr_local; +#endif - - if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) - { -@@ -753,7 +773,11 @@ - long nTime; - long long nData; - int i; + + if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) + { +@@ -753,7 +773,11 @@ void TCP_Bench(void *arg) + long nTime; + long long nData; + int i; +#ifdef USE_IPV6 + struct sockaddr_in6 sa_server, sa_client; +#else - struct sockaddr_in sa_server, sa_client; + struct sockaddr_in sa_server, sa_client; +#endif - int server; - int rc; - int nByte; -@@ -764,7 +788,11 @@ - return; - } - + int server; + int rc; + int nByte; +@@ -764,7 +788,11 @@ void TCP_Bench(void *arg) + return; + } + +#ifdef USE_IPV6 + if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0) +#else - if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) + if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) +#endif - { - psock_errno("socket()"); - free(cBuffer); -@@ -774,21 +802,33 @@ - setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); - setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); - + { + psock_errno("socket()"); + free(cBuffer); +@@ -774,21 +802,33 @@ void TCP_Bench(void *arg) + setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); + setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); + +#ifdef USE_IPV6 + sa_client.sin6_family = AF_INET6; + sa_client.sin6_port = htons(0); + sa_client.sin6_addr = addr_local; +#else - sa_client.sin_family = AF_INET; - sa_client.sin_port = htons(0); - sa_client.sin_addr = addr_local; + sa_client.sin_family = AF_INET; + sa_client.sin_port = htons(0); + sa_client.sin_addr = addr_local; +#endif - - if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0) - { - psock_errno("bind()"); - soclose(server); - free(cBuffer); -- return THREADRESULT; + + if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0) + { + psock_errno("bind()"); + soclose(server); + free(cBuffer); +- return THREADRESULT; + return; - } - + } + +#ifdef USE_IPV6 + sa_server.sin6_family = AF_INET6; + sa_server.sin6_port = htons(nPort); + sa_server.sin6_addr = addr_server; +#else - sa_server.sin_family = AF_INET; - sa_server.sin_port = htons(nPort); - sa_server.sin_addr = addr_server; + sa_server.sin_family = AF_INET; + sa_server.sin_port = htons(nPort); + sa_server.sin_addr = addr_server; +#endif - - if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) - { -@@ -911,7 +951,11 @@ - THREAD UDP_Receiver(void *arg) - { - char *cBuffer; + + if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) + { +@@ -911,7 +951,11 @@ void TCP_Bench(void *arg) + THREAD UDP_Receiver(void *arg) + { + char *cBuffer; +#ifdef USE_IPV6 + struct sockaddr_in6 sa_server, sa_client; +#else - struct sockaddr_in sa_server, sa_client; + struct sockaddr_in sa_server, sa_client; +#endif - int rc; - socklen_type nBytes; - -@@ -921,7 +965,11 @@ - return THREADRESULT; - } - + int rc; + socklen_type nBytes; + +@@ -921,7 +965,11 @@ THREAD UDP_Receiver(void *arg) + return THREADRESULT; + } + +#ifdef USE_IPV6 + if ((udpsocket = socket(PF_INET6, SOCK_DGRAM, 0)) < 0) +#else - if ((udpsocket = socket(PF_INET, SOCK_DGRAM, 0)) < 0) + if ((udpsocket = socket(PF_INET, SOCK_DGRAM, 0)) < 0) +#endif - { - psock_errno("socket(DGRAM)"); - free(cBuffer); -@@ -931,9 +979,15 @@ - setsockopt(udpsocket, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); - setsockopt(udpsocket, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); - + { + psock_errno("socket(DGRAM)"); + free(cBuffer); +@@ -931,9 +979,15 @@ THREAD UDP_Receiver(void *arg) + setsockopt(udpsocket, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); + setsockopt(udpsocket, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); + +#ifdef USE_IPV6 + sa_server.sin6_family = AF_INET6; + sa_server.sin6_port = htons(nAuxPort); + sa_server.sin6_addr = addr_local; +#else - sa_server.sin_family = AF_INET; - sa_server.sin_port = htons(nAuxPort); - sa_server.sin_addr = addr_local; + sa_server.sin_family = AF_INET; + sa_server.sin_port = htons(nAuxPort); + sa_server.sin_addr = addr_local; +#endif - - if (bind(udpsocket, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) - { -@@ -973,7 +1027,11 @@ - TIMER nTimer; - long nTime; - long long nData; + + if (bind(udpsocket, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) + { +@@ -973,7 +1027,11 @@ THREAD UDP_Server(void *arg) + TIMER nTimer; + long nTime; + long long nData; +#ifdef USE_IPV6 + struct sockaddr_in6 sa_server, sa_client; +#else - struct sockaddr_in sa_server, sa_client; + struct sockaddr_in sa_server, sa_client; +#endif - int server, client; - struct timeval tv; - fd_set fds; -@@ -986,7 +1044,11 @@ - return THREADRESULT; - } - + int server, client; + struct timeval tv; + fd_set fds; +@@ -986,7 +1044,11 @@ THREAD UDP_Server(void *arg) + return THREADRESULT; + } + +#ifdef USE_IPV6 + if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0) +#else - if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) + if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) +#endif - { - psock_errno("socket(STREAM)"); - free(cBuffer); -@@ -996,9 +1058,15 @@ - setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); - setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); - + { + psock_errno("socket(STREAM)"); + free(cBuffer); +@@ -996,9 +1058,15 @@ THREAD UDP_Server(void *arg) + setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); + setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); + +#ifdef USE_IPV6 + sa_server.sin6_family = AF_INET6; + sa_server.sin6_port = htons(nAuxPort); + sa_server.sin6_addr = addr_local; +#else - sa_server.sin_family = AF_INET; - sa_server.sin_port = htons(nAuxPort); - sa_server.sin_addr = addr_local; + sa_server.sin_family = AF_INET; + sa_server.sin_port = htons(nAuxPort); + sa_server.sin_addr = addr_local; +#endif - - if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) - { -@@ -1044,7 +1112,11 @@ - printf("UDP connection established ... "); - fflush(stdout); - + + if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) + { +@@ -1044,7 +1112,11 @@ THREAD UDP_Server(void *arg) + printf("UDP connection established ... "); + fflush(stdout); + +#ifdef USE_IPV6 + sa_client.sin6_port = htons(nAuxPort); +#else - sa_client.sin_port = htons(nAuxPort); + sa_client.sin_port = htons(nAuxPort); +#endif - - for (;;) - { -@@ -1160,7 +1232,11 @@ - long nResult; - long long nData; - int i; + + for (;;) + { +@@ -1160,7 +1232,11 @@ void UDP_Bench(void *arg) + long nResult; + long long nData; + int i; +#ifdef USE_IPV6 + struct sockaddr_in6 sa_server, sa_client; +#else - struct sockaddr_in sa_server, sa_client; + struct sockaddr_in sa_server, sa_client; +#endif - int server; - int rc, nByte; - -@@ -1170,7 +1246,11 @@ - return; - } - + int server; + int rc, nByte; + +@@ -1170,7 +1246,11 @@ void UDP_Bench(void *arg) + return; + } + +#ifdef USE_IPV6 + if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0) +#else - if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) + if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0) +#endif - { - psock_errno("socket()"); - free(cBuffer); -@@ -1180,21 +1260,33 @@ - setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); - setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); - + { + psock_errno("socket()"); + free(cBuffer); +@@ -1180,21 +1260,33 @@ void UDP_Bench(void *arg) + setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize)); + setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize)); + +#ifdef USE_IPV6 + sa_client.sin6_family = AF_INET6; + sa_client.sin6_port = htons(0); + sa_client.sin6_addr = addr_local; +#else - sa_client.sin_family = AF_INET; - sa_client.sin_port = htons(0); - sa_client.sin_addr = addr_local; + sa_client.sin_family = AF_INET; + sa_client.sin_port = htons(0); + sa_client.sin_addr = addr_local; +#endif - - if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0) - { - psock_errno("bind(STREAM)"); - soclose(server); - free(cBuffer); -- return THREADRESULT; + + if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0) + { + psock_errno("bind(STREAM)"); + soclose(server); + free(cBuffer); +- return THREADRESULT; + return; - } - + } + +#ifdef USE_IPV6 + sa_server.sin6_family = AF_INET6; + sa_server.sin6_port = htons(nAuxPort); + sa_server.sin6_addr = addr_server; +#else - sa_server.sin_family = AF_INET; - sa_server.sin_port = htons(nAuxPort); - sa_server.sin_addr = addr_server; + sa_server.sin_family = AF_INET; + sa_server.sin_port = htons(nAuxPort); + sa_server.sin_addr = addr_server; +#endif - - if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) - { -@@ -1425,17 +1517,29 @@ - return psock_errno("sock_init()"), 1; - - if (szLocal == 0) + + if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0) + { +@@ -1425,17 +1517,29 @@ int main(int argc, char **argv) + return psock_errno("sock_init()"), 1; + + if (szLocal == 0) +#ifdef USE_IPV6 + addr_local = in6addr_any; +#else - addr_local.s_addr = INADDR_ANY; + addr_local.s_addr = INADDR_ANY; +#endif - else - { - if (isdigit(*szLocal)) + else + { + if (isdigit(*szLocal)) +#ifdef USE_IPV6 + inet_pton(AF_INET6, szLocal, &addr_local); +#else - addr_local.s_addr = inet_addr(szLocal); + addr_local.s_addr = inet_addr(szLocal); +#endif - else - { - if ((host = gethostbyname(szLocal)) == NULL) - return psock_errno("gethostbyname()"), 1; - + else + { + if ((host = gethostbyname(szLocal)) == NULL) + return psock_errno("gethostbyname()"), 1; + +#ifdef USE_IPV6 + addr_local = * (struct in6_addr *) (host->h_addr); +#else - addr_local = * (struct in_addr *) (host->h_addr); + addr_local = * (struct in_addr *) (host->h_addr); +#endif - } - } - -@@ -1445,13 +1549,21 @@ - usage(); - - if (isdigit(*argv[optind])) + } + } + +@@ -1445,13 +1549,21 @@ int main(int argc, char **argv) + usage(); + + if (isdigit(*argv[optind])) +#ifdef USE_IPV6 + inet_pton(AF_INET6, argv[optind], &addr_server); +#else - addr_server.s_addr = inet_addr(argv[optind]); + addr_server.s_addr = inet_addr(argv[optind]); +#endif - else - { - if ((host = gethostbyname(argv[optind])) == NULL) - return psock_errno("gethostbyname()"), 1; - + else + { + if ((host = gethostbyname(argv[optind])) == NULL) + return psock_errno("gethostbyname()"), 1; + +#ifdef USE_IPV6 + addr_server = * (struct in6_addr *) (host->h_addr); +#else - addr_server = * (struct in_addr *) (host->h_addr); + addr_server = * (struct in_addr *) (host->h_addr); +#endif - } - } - } + } + } + } diff --git a/comms/mlan3/Makefile b/comms/mlan3/Makefile index e06457f8e397..3cb86ecad1be 100644 --- a/comms/mlan3/Makefile +++ b/comms/mlan3/Makefile @@ -1,23 +1,24 @@ # Created by: hm # $FreeBSD$ PORTNAME= mlan3 PORTVERSION= 1.00 CATEGORIES= comms MASTER_SITES= http://files.maximintegrated.com/sia_bu/public/ DISTNAME= owpd300b MAINTAINER= portmaster@bsdforge.com COMMENT= Version 3.00 beta API for Dallas Semiconductors 1-wire lan devices LICENSE= MIT LICENSE_FILE= ${WRKSRC}/license.txt NO_WRKSUBDIR= yes -USES= uidfix zip +USES= dos2unix uidfix zip +DOS2UNIX_GLOB= *.c *.h post-patch: @${REINPLACE_CMD} -e '/int main/s/short argc/int argc/' \ ${WRKSRC}/apps/gethumd/gethumd.c ${WRKSRC}/apps/shaapp/shaapp.c .include diff --git a/comms/mlan3/files/patch-Makefiles b/comms/mlan3/files/patch-Makefiles index e9f029229070..b769b5f2cc1b 100644 --- a/comms/mlan3/files/patch-Makefiles +++ b/comms/mlan3/files/patch-Makefiles @@ -1,301 +1,301 @@ ---- Makefile Thu Jan 1 01:00:00 1970 -+++ Makefile Wed Oct 27 17:03:17 2004 +--- Makefile.orig 2016-06-20 12:38:29 UTC ++++ Makefile @@ -0,0 +1,4 @@ + +SUBDIR= lib apps + +.include ---- apps/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/Makefile Wed Oct 27 17:03:17 2004 +--- apps/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/Makefile @@ -0,0 +1,6 @@ + +SUBDIR= atodtst counter coupler fish gethumd memutil mweather shaapp \ + swtsngl temp tstfind + +.include + ---- apps/atodtst/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/atodtst/Makefile Wed Oct 27 17:03:17 2004 +--- apps/atodtst/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/atodtst/Makefile @@ -0,0 +1,15 @@ +PROG= atodtst +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/counter/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/counter/Makefile Wed Oct 27 17:03:17 2004 +--- apps/counter/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/counter/Makefile @@ -0,0 +1,15 @@ +PROG= counter +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/coupler/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/coupler/Makefile Wed Oct 27 17:03:17 2004 +--- apps/coupler/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/coupler/Makefile @@ -0,0 +1,15 @@ +PROG= coupler +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/fish/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/fish/Makefile Wed Oct 27 17:03:17 2004 +--- apps/fish/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/fish/Makefile @@ -0,0 +1,15 @@ +PROG= fish +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/gethumd/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/gethumd/Makefile Wed Oct 27 17:03:17 2004 +--- apps/gethumd/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/gethumd/Makefile @@ -0,0 +1,15 @@ +PROG= gethumd +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/memutil/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/memutil/Makefile Wed Oct 27 17:03:17 2004 +--- apps/memutil/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/memutil/Makefile @@ -0,0 +1,15 @@ +PROG= memutil +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/mweather/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/mweather/Makefile Wed Oct 27 17:03:17 2004 +--- apps/mweather/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/mweather/Makefile @@ -0,0 +1,15 @@ +PROG= mweather +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/shaapp/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/shaapp/Makefile Wed Oct 27 17:03:17 2004 +--- apps/shaapp/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/shaapp/Makefile @@ -0,0 +1,15 @@ +PROG= shaapp +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/swtloop/Makefile.app Thu Jan 1 01:00:00 1970 -+++ apps/swtloop/Makefile.app Wed Oct 27 17:03:17 2004 +--- apps/swtloop/Makefile.app.orig 2016-06-20 12:38:29 UTC ++++ apps/swtloop/Makefile.app @@ -0,0 +1,8 @@ +PROG= tstfind +CFLAGS= -I. -Wall -I ../../common +LDFLAGS= -L ../../common -L ../../lib/userial +LDADD= -lmlanser -lmlancom +NO_MAN= true +SRCS= tstfind.c + +.include ---- apps/swtsngl/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/swtsngl/Makefile Wed Oct 27 17:03:17 2004 +--- apps/swtsngl/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/swtsngl/Makefile @@ -0,0 +1,15 @@ +PROG= swtsngl +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/temp/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/temp/Makefile Wed Oct 27 17:03:17 2004 +--- apps/temp/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/temp/Makefile @@ -0,0 +1,15 @@ +PROG= temp +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- apps/thermo/Makefile.app Thu Jan 1 01:00:00 1970 -+++ apps/thermo/Makefile.app Wed Oct 27 17:03:17 2004 +--- apps/thermo/Makefile.app.orig 2016-06-20 12:38:29 UTC ++++ apps/thermo/Makefile.app @@ -0,0 +1,8 @@ +PROG= tstfind +CFLAGS= -I. -Wall -I ../../common +LDFLAGS= -L ../../common -L ../../lib/userial +LDADD= -lmlanser -lmlancom +NO_MAN= true +SRCS= tstfind.c + +.include ---- apps/tstfind/Makefile Thu Jan 1 01:00:00 1970 -+++ apps/tstfind/Makefile Wed Oct 27 17:03:17 2004 +--- apps/tstfind/Makefile.orig 2016-06-20 12:38:29 UTC ++++ apps/tstfind/Makefile @@ -0,0 +1,15 @@ +PROG= tstfind +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MLANCOM= ${.CURDIR}/../../common +MLANLIB= ${.CURDIR}/../../lib/userial +CFLAGS= -I. -Wall -I${MLANCOM} +LDADD= -L${MLANLIB} -lmlan +DPADD= ${MLANLIB}/libmlan.a +NO_MAN= 1 +SRCS= ${PROG}.c + +test: ${PROG} + ./${PROG} /dev/cuaa0 + +.include ---- common/ownet.h Fri Sep 28 21:42:02 2001 -+++ common/ownet.h Wed Oct 27 17:03:17 2004 +--- common/ownet.h.orig 2016-06-20 12:38:29 UTC ++++ common/ownet.h @@ -133,6 +133,10 @@ - typedef unsigned short ushort; - typedef unsigned long ulong; - #endif + typedef unsigned short ushort; + typedef unsigned long ulong; + #endif + #if (__FreeBSD__) + #include + typedef unsigned long ulong; + #endif - #endif - #ifdef SDCC - //intent of ushort is 2 bytes unsigned. ---- lib/Makefile Thu Jan 1 01:00:00 1970 -+++ lib/Makefile Wed Oct 27 17:03:17 2004 + #endif + #ifdef SDCC + //intent of ushort is 2 bytes unsigned. +--- lib/Makefile.orig 2016-06-20 12:38:29 UTC ++++ lib/Makefile @@ -0,0 +1,3 @@ +SUBDIR= userial + +.include ---- lib/userial/Link/linuxlnk.c Fri Sep 28 21:42:14 2001 -+++ lib/userial/Link/linuxlnk.c Wed Oct 27 17:03:17 2004 +--- lib/userial/Link/linuxlnk.c.orig 2016-06-20 12:38:29 UTC ++++ lib/userial/Link/linuxlnk.c @@ -93,6 +93,7 @@ - #include - #include - #include + #include + #include + #include +#include - - #include "ds2480.h" - #include "ownet.h" ---- lib/userial/Makefile Thu Jan 1 01:00:00 1970 -+++ lib/userial/Makefile Wed Oct 27 17:03:56 2004 + + #include "ds2480.h" + #include "ownet.h" +--- lib/userial/Makefile.orig 2016-06-20 12:38:29 UTC ++++ lib/userial/Makefile @@ -0,0 +1,33 @@ +MLANCOM= ${.CURDIR}/../../common +MLANLNK= ${.CURDIR}/Link +LIB= mlan +CFLAGS= -I. -Wall -I${MLANCOM} +NO_PROFILE= yes +PREFIX?= /usr/local +LIBDIR= ${PREFIX}/lib + + +.PATH: ${MLANCOM} ${MLANLNK} + +SRCS= ds2480ut.c owllu.c ownetu.c owsesu.c owtrnu.c + +SRCS+= linuxlnk.c + +SRCS+= ad26.c atod20.c cnt1d.c \ + crcutil.c findtype.c ibsha33o.c \ + ioutil.c mbappreg.c mbee.c \ + mbeprom.c mbnv.c mbnvcrc.c \ + mbscr.c mbscrcrc.c mbscree.c \ + mbscrex.c mbsha.c mbshaee.c \ + owcache.c owerr.c owfile.c \ + owpgrw.c owprgm.c rawmem.c \ + screenio.c sha18.c sha33.c \ + shadebit.c shadebitvm.c shaibutton.c \ + swt05.c swt12.c swt1f.c \ + temp10.c thermo21.c weather.c + +beforeinstall: + ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} ${MLANCOM}/ownet.h ${DESTDIR}/${PREFIX}/include + +.include diff --git a/databases/pgagent/Makefile b/databases/pgagent/Makefile index 05f87c943026..91d122839ee0 100644 --- a/databases/pgagent/Makefile +++ b/databases/pgagent/Makefile @@ -1,25 +1,25 @@ # Created by: Max Khon # $FreeBSD$ PORTNAME= pgagent PORTVERSION= 3.4.0 PORTREVISION= 2 CATEGORIES= databases MASTER_SITES= PGSQL/pgadmin3/release/pgagent DISTNAME= pgAgent-${PORTVERSION}-Source MAINTAINER= fjoe@FreeBSD.org COMMENT= Job scheduler for PostgreSQL -USES= cmake pgsql +USES= cmake dos2unix pgsql +DOS2UNIX_GLOB= *.txt CMAKE_ARGS= -DSTATIC_BUILD:BOOL=NO -DWX_CONFIG_PATH:FILEPATH="${WX_CONFIG}" USE_WX= 2.8 -WX_UNICODE= yes PLIST_FILES= bin/pgagent \ share/postgresql/extension/pgagent--3.4.sql \ share/postgresql/extension/pgagent--unpackaged--3.4.sql \ share/postgresql/extension/pgagent.control PORTDATA= * .include diff --git a/databases/pgagent/files/patch-CMakeLists.txt b/databases/pgagent/files/patch-CMakeLists.txt index b981d3e46398..fa36abdfea47 100644 --- a/databases/pgagent/files/patch-CMakeLists.txt +++ b/databases/pgagent/files/patch-CMakeLists.txt @@ -1,19 +1,19 @@ ---- CMakeLists.txt.orig 2014-02-26 04:48:45.000000000 +0700 -+++ CMakeLists.txt 2015-01-28 08:06:29.000000000 +0600 -@@ -134,12 +134,12 @@ - INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION .) - ELSE(WIN32) - INSTALL(TARGETS pgagent DESTINATION bin) -- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share) -- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share) -+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share/pgagent) -+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share/pgagent) - ENDIF(WIN32) - --INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .) --INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .) -+INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION share/pgagent) -+INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION share/pgagent) - - # Extension - IF(PG_EXTENSION) +--- CMakeLists.txt.orig 2016-06-20 15:30:20 UTC ++++ CMakeLists.txt +@@ -134,12 +134,12 @@ IF (WIN32) + INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION .) + ELSE(WIN32) + INSTALL(TARGETS pgagent DESTINATION bin) +- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share) +- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share) ++ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share/pgagent) ++ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share/pgagent) + ENDIF(WIN32) + +-INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .) +-INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .) ++INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION share/pgagent) ++INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION share/pgagent) + + # Extension + IF(PG_EXTENSION) diff --git a/deskutils/everygui/Makefile b/deskutils/everygui/Makefile index 0f91f00e2e04..61b5ee5087fa 100644 --- a/deskutils/everygui/Makefile +++ b/deskutils/everygui/Makefile @@ -1,29 +1,30 @@ # Created by: Remington Lang # $FreeBSD$ PORTNAME= everygui PORTVERSION= 0.99.b PORTREVISION= 7 CATEGORIES= deskutils gnome MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Dynamic GUI for an OS command -USES= python +USES= dos2unix python +DOS2UNIX_GLOB= *.py USE_PYTHON= distutils autoplist USE_GNOME= libglade2 pygnome2 WRKSRC= ${WRKDIR}/${PORTNAME} post-patch: @${FIND} ${WRKSRC} -name "*.py" | ${XARGS} ${REINPLACE_CMD} -e\ 's,/usr/share,${PREFIX}/share,g' -e\ 's,/usr/src,${PREFIX}/src,g' @${REINPLACE_CMD} -e 's,/usr/src/everygui,${PREFIX}/src/everygui,g' \ ${WRKSRC}/everygui @${REINPLACE_CMD} -e 's,/usr/src,${PREFIX}/src,g' \ ${WRKSRC}/egdesign @${FIND} ${WRKSRC} -name "*.bak" -delete .include diff --git a/deskutils/everygui/files/patch-setup.py b/deskutils/everygui/files/patch-setup.py index 9af894d87d7f..cc06c8f790ca 100644 --- a/deskutils/everygui/files/patch-setup.py +++ b/deskutils/everygui/files/patch-setup.py @@ -1,19 +1,19 @@ ---- setup.py.orig Tue Jan 10 09:59:47 2006 -+++ setup.py Sun Jan 15 11:46:49 2006 -@@ -8,11 +8,6 @@ - from distutils.core import setup - import glob +--- setup.py.orig 2016-06-20 15:30:48 UTC ++++ setup.py +@@ -8,11 +8,6 @@ import sys + from distutils.core import setup + import glob -try: - import gtk -except: - sys.exit("pyGTK version 2.6 or greater is required to run everygui. http://www.pygtk.org") - - - setup( - name='everygui', -@@ -29,4 +24,3 @@ - ("share/everygui/egconfig", glob.glob("egconfig/*.egd"))] + + setup( + name='everygui', +@@ -29,4 +24,3 @@ setup( + ("share/everygui/egconfig", glob.glob("egconfig/*.egd"))] ) -os.chmod("/usr/share/everygui/egconfig", 0777) diff --git a/devel/charva/Makefile b/devel/charva/Makefile index 9ae6926f8d40..b16566b689cc 100644 --- a/devel/charva/Makefile +++ b/devel/charva/Makefile @@ -1,55 +1,50 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= charva PORTVERSION= 1.1.4 PORTREVISION= 5 CATEGORIES= devel java MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} DISTNAME= ${PORTNAME} MAINTAINER= ale@FreeBSD.org COMMENT= Java Windowing Toolkit for Text Terminals BUILD_DEPENDS= gmake:devel/gmake RUN_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:java/jakarta-commons-logging OPTIONS_DEFINE= DOCS USES= dos2unix zip -DOS2UNIX_FILES= c/src/Makefile.freebsd.txt +DOS2UNIX_GLOB= build.xml Makefile.freebsd.txt *.c *.java USE_JAVA= yes JAVA_VERSION= 1.6+ USE_ANT= yes ALL_TARGET= clean makeDLL dist -PLIST_SUB= JAVA_HOME=${JAVA_HOME:S/${PREFIX}\///} -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar \ - %%JAVA_HOME%%/jre/lib/${MACHINE_ARCH}/libTerminal.so +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar \ + ${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/libTerminal.so PORTDOCS= * -.include - -.if ${PORT_OPTIONS:MDOCS} -ALL_TARGET+= javadoc -.endif +DOCS_ALL_TARGET= javadoc do-install: @${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/${PORTNAME}.jar..." @${INSTALL_DATA} ${WRKSRC}/java/dist/lib/${PORTNAME}.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar @${ECHO_MSG} " [DONE]" @${ECHO_MSG} -n ">> Installing JNI library as ${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/libTerminal.so..." -@${MKDIR} ${STAGEDIR}${JAVA_HOME}/jre/lib/${MACHINE_ARCH} @${INSTALL_PROGRAM} ${WRKSRC}/c/lib/libTerminal.so \ ${STAGEDIR}${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/libTerminal.so @${ECHO_MSG} " [DONE]" -.if ${PORT_OPTIONS:MDOCS} + +do-install-DOCS-on: @${ECHO_MSG} -n ">> Installing documentation..." @${MKDIR} ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC}/docs && ${FIND} * \ | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR} > /dev/null 2>&1 @${ECHO_MSG} " [DONE]" -.endif .include diff --git a/devel/charva/files/patch-build.xml b/devel/charva/files/patch-build.xml index 34009684f83d..886a38e73476 100644 --- a/devel/charva/files/patch-build.xml +++ b/devel/charva/files/patch-build.xml @@ -1,26 +1,26 @@ ---- build.xml.orig Sun Sep 10 22:10:16 2006 -+++ build.xml Tue Dec 12 08:37:44 2006 +--- build.xml.orig 2016-06-20 12:40:44 UTC ++++ build.xml @@ -90,6 +90,7 @@ - - - -+ - - - + + + ++ + + + @@ -189,14 +190,8 @@ - description="Compile the JNI shared library"> - - -- -- - Compiling the shared library using "Makefile.${os.type}.txt" -- + description="Compile the JNI shared library"> + + +- +- + Compiling the shared library using "Makefile.${os.type}.txt" +- diff --git a/devel/charva/files/patch-c_src_Makefile.freebsd.txt b/devel/charva/files/patch-c_src_Makefile.freebsd.txt index f5cff1b2b976..1bc1311d69b1 100644 --- a/devel/charva/files/patch-c_src_Makefile.freebsd.txt +++ b/devel/charva/files/patch-c_src_Makefile.freebsd.txt @@ -1,10 +1,10 @@ ---- ./c/src/Makefile.freebsd.txt.orig 2013-10-30 08:21:28.829906040 +0000 -+++ ./c/src/Makefile.freebsd.txt 2013-10-30 08:21:37.384905061 +0000 -@@ -6,7 +6,6 @@ +--- c/src/Makefile.freebsd.txt.orig 2016-06-20 12:40:44 UTC ++++ c/src/Makefile.freebsd.txt +@@ -6,7 +6,6 @@ OS = freebsd SHARED_OBJECT_EXT = so TARGET = libTerminal.${SHARED_OBJECT_EXT} -CC = gcc CFLAGS = -fpic -shared # The file "jni.h" is in ${JAVA_HOME}/include diff --git a/devel/charva/files/patch-c_src_Toolkit.c b/devel/charva/files/patch-c_src_Toolkit.c index ab2c57c977ed..1a1fb852ae23 100644 --- a/devel/charva/files/patch-c_src_Toolkit.c +++ b/devel/charva/files/patch-c_src_Toolkit.c @@ -1,18 +1,18 @@ ---- c/src/Toolkit.c.orig Wed Dec 13 12:29:03 2006 -+++ c/src/Toolkit.c Wed Dec 13 12:35:30 2006 -@@ -372,6 +372,7 @@ - if (colors_started) - attr = COLOR_PAIR(colorpair_); - -+ attron(attr); - // If the top of the box is outside the clipping rectangle, don't bother - // to draw the top. - if (top_ >= top && top_ <= bottom) { -@@ -414,6 +415,7 @@ - my_addch_with_clip(ACS_VLINE); // right vertical line - } - } -+ attroff(attr); - } - - JNIEXPORT void JNICALL Java_charva_awt_Toolkit_blankBoxNative +--- c/src/Toolkit.c.orig 2016-06-20 12:40:44 UTC ++++ c/src/Toolkit.c +@@ -372,6 +372,7 @@ JNIEXPORT void JNICALL Java_charva_awt_T + if (colors_started) + attr = COLOR_PAIR(colorpair_); + ++ attron(attr); + // If the top of the box is outside the clipping rectangle, don't bother + // to draw the top. + if (top_ >= top && top_ <= bottom) { +@@ -414,6 +415,7 @@ JNIEXPORT void JNICALL Java_charva_awt_T + my_addch_with_clip(ACS_VLINE); // right vertical line + } + } ++ attroff(attr); + } + + JNIEXPORT void JNICALL Java_charva_awt_Toolkit_blankBoxNative diff --git a/devel/charva/files/patch-java_src_charva_awt_CardLayout.java b/devel/charva/files/patch-java_src_charva_awt_CardLayout.java index f6099f09c572..107a3a8ad140 100644 --- a/devel/charva/files/patch-java_src_charva_awt_CardLayout.java +++ b/devel/charva/files/patch-java_src_charva_awt_CardLayout.java @@ -1,118 +1,118 @@ ---- java/src/charva/awt/CardLayout.java.orig Mon Jan 29 09:39:30 2007 -+++ java/src/charva/awt/CardLayout.java Mon Jan 29 09:39:30 2007 +--- java/src/charva/awt/CardLayout.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/CardLayout.java @@ -0,0 +1,115 @@ +package charva.awt; + +import java.util.HashMap; + +/** + * Emulates @{java.awt.CardLayout}. + * @author lapo@lapo.it + */ +public class CardLayout implements LayoutManager2 { + + protected HashMap names = new HashMap(); + protected int current = -1; + protected int max = 0; + + public void addLayoutComponent(Component component, Object constraints) { + if (!(constraints instanceof String)) + throw new IllegalArgumentException("cannot add to layout: constraint must be a string"); + String name = (String) constraints; + if ((max == 0) && (component.isVisible())) + current = 0; + if (max > 0) + component.setVisible(false); // initially only the first card may be visible + if (name != null) + names.put(name, Integer.valueOf(max)); + ++max; + } + + public void invalidateLayout(Container target) { + // this layout manager caches nothing + } + + public Dimension minimumSize(Container container) { + Dimension min = new Dimension(0, 0); + for (int i = 0, j = container.getComponentCount(); i < j; ++i) { + Dimension t = container.getComponent(i).minimumSize(); + if (t.width > min.width) + min.width = t.width; + if (t.height > min.height) + min.height = t.height; + } + Insets insets = container.getInsets(); + min.width += insets.left + insets.right; + min.height += insets.top + insets.bottom; + return min; + } + + public void doLayout(Container container) { + Dimension size = container.getSize(); + Insets insets = container.getInsets(); + Point cardOrigin = new Point(insets.left, insets.top); + Dimension cardSize = new Dimension( + size.width - (insets.left + insets.right), + size.height - (insets.top + insets.bottom)); + for (int i = 0, j = container.getComponentCount(); i < j; ++i) { + Component c = container.getComponent(i); + c.setBounds(cardOrigin, cardSize); + if (c instanceof Container) + ((Container) c).doLayout(); + } + } + + /** + * Flips to the component with the given insertion index. + * If no such component exists, then nothing happens. + * @param container the parent container in which to do the layout + * @param index the component index + * @see charva.awt.CardLayout#addLayoutComponent(java.awt.Component, java.lang.Object) + */ + public void show(Container container, int index) { + if ((index < 0) || (index >= max) || (index == current)) + return; + for (int i = 0, j = container.getComponentCount(); i < j; ++i) { + Component c = container.getComponent(i); + if (c.isVisible()) + c.setVisible(false); + } + current = index; + container.getComponent(index).setVisible(true); + container.getComponent(index).requestFocus(); + container.validate(); + } + + /** + * Flips to the component that was added to this layout with the + * specified name, using addLayoutComponent. + * If no such component exists, then nothing happens. + * @param container the parent container in which to do the layout + * @param name the component name + * @see charva.awt.CardLayout#addLayoutComponent(java.awt.Component, java.lang.Object) + */ + public void show(Container container, String name) { + Integer val = (Integer) names.get(name); + if (val != null) + show(container, val.intValue()); + } + + /** + * Flips to the first card of the container. + * @param container the parent container in which to do the layout + * @see charva.awt.CardLayout#last + */ + public void first(Container container) { + show(container, 0); + } + + /** + * Flips to the last card of the container. + * @param container the parent container in which to do the layout + * @see charva.awt.CardLayout#first + */ + public void last(Container container) { + show(container, max - 1); + } + +} diff --git a/devel/charva/files/patch-java_src_charva_awt_Component.java b/devel/charva/files/patch-java_src_charva_awt_Component.java index 241cc078e49c..9e28008e993a 100644 --- a/devel/charva/files/patch-java_src_charva_awt_Component.java +++ b/devel/charva/files/patch-java_src_charva_awt_Component.java @@ -1,29 +1,29 @@ ---- java/src/charva/awt/Component.java.orig Mon Aug 14 18:03:14 2006 -+++ java/src/charva/awt/Component.java Mon Jan 29 09:39:30 2007 -@@ -118,6 +118,17 @@ public abstract class Component { - } - - /** -+ * Determines whether this component will be displayed on the screen -+ * if it's displayable. -+ * @return true if the component and all of its ancestors -+ * are visible, false otherwise -+ */ -+ public boolean isRecursivelyVisible() { -+ Container parent = getParent(); -+ return _visible && (parent == null || parent.isRecursivelyVisible()); -+ } -+ -+ /** - * To be implemented by concrete subclasses. - */ - public abstract void draw(); -@@ -449,7 +460,7 @@ public abstract class Component { - * traversal. - */ - public boolean isFocusTraversable() { -- return (_enabled && _visible); -+ return (_enabled && isRecursivelyVisible()); - } - - /** +--- java/src/charva/awt/Component.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/Component.java +@@ -118,6 +118,17 @@ public abstract class Component { + } + + /** ++ * Determines whether this component will be displayed on the screen ++ * if it's displayable. ++ * @return true if the component and all of its ancestors ++ * are visible, false otherwise ++ */ ++ public boolean isRecursivelyVisible() { ++ Container parent = getParent(); ++ return _visible && (parent == null || parent.isRecursivelyVisible()); ++ } ++ ++ /** + * To be implemented by concrete subclasses. + */ + public abstract void draw(); +@@ -449,7 +460,7 @@ public abstract class Component { + * traversal. + */ + public boolean isFocusTraversable() { +- return (_enabled && _visible); ++ return (_enabled && isRecursivelyVisible()); + } + + /** diff --git a/devel/charva/files/patch-java_src_charva_awt_Container.java b/devel/charva/files/patch-java_src_charva_awt_Container.java index 1c3f2d525c58..ebec529e5fe0 100644 --- a/devel/charva/files/patch-java_src_charva_awt_Container.java +++ b/devel/charva/files/patch-java_src_charva_awt_Container.java @@ -1,100 +1,100 @@ ---- java/src/charva/awt/Container.java.orig Mon Aug 7 12:07:52 2006 -+++ java/src/charva/awt/Container.java Mon Jan 29 09:39:30 2007 -@@ -89,6 +89,23 @@ public abstract class Container - invalidate(); - } - -+ public void setBounds(int top_, int left_, int bottom_, int right_) { -+ super.setBounds(top_, left_, bottom_, right_); -+ setSize(right_ - left_ + 1, bottom_ - top_ + 1); -+ } -+ -+ public void setBounds(Point topleft_, Dimension size_) { -+ super.setBounds(topleft_, size_); -+ setSize(size_); -+ } -+ -+ public void setBounds(Rectangle bounds) { -+ super.setBounds(bounds); -+ setSize( -+ bounds.getRight() - bounds.getLeft() + 1, -+ bounds.getBottom() - bounds.getTop() + 1); -+ } -+ - public Dimension minimumSize() { - if (_layoutMgr == null) - return _size; -@@ -105,13 +122,30 @@ public abstract class Container - return (Component) _components.elementAt(n); - } - -+ protected Component getComponentAt(int x, int y, boolean checkVisibility) { -+ Enumeration e = _components.elements(); -+ while (e.hasMoreElements()) { -+ Component c = (Component) e.nextElement(); -+ if ((!checkVisibility || c.isVisible()) && c.contains(x, y)) { -+ if (c instanceof Container) { -+ // Calculate the coordinates of the point relative -+ // to the origin of the container -+ Point origin = c.getLocation(); -+ return ((Container) c).getComponentAt(x - origin.x, y - origin.y, checkVisibility); -+ } else -+ return c; -+ } -+ } -+ return null; -+ } -+ - /** - * Returns the component that contains the specified point, or null - * if no component contains the point. The x and y coordinates of - * the point are relative to the origin of this container. - */ - public Component getComponentAt(Point p) { -- return getComponentAt(p.x, p.y); -+ return getComponentAt(p.x, p.y, false); - } - - /** -@@ -120,20 +154,27 @@ public abstract class Container - * the point are relative to the origin of this container. - */ - public Component getComponentAt(int x, int y) { -- Enumeration e = _components.elements(); -- while (e.hasMoreElements()) { -- Component c = (Component) e.nextElement(); -- if (c.contains(x, y)) { -- if (c instanceof Container) { -- // Calculate the coordinates of the point relative -- // to the origin of the container -- Point origin = c.getLocation(); -- return ((Container) c).getComponentAt(x - origin.x, y - origin.y); -- } else -- return c; -- } -- } -- return null; -+ return getComponentAt(x, y, false); -+ } -+ -+ /** -+ * Returns the visible component that contains the specified point, -+ * or null if no visible component contains the point. The x and y -+ * coordinates of the point are relative to the origin of this container. -+ */ -+ public final Component findComponentAt(Point p) { -+ return findComponentAt(p.x, p.y); -+ } -+ -+ /** -+ * Returns the visible component that contains the specified point, -+ * or null if no visible component contains the point. The x and y -+ * coordinates of the point are relative to the origin of this container. -+ */ -+ public final Component findComponentAt(int x, int y) { -+ if (!isRecursivelyVisible()) -+ return null; -+ return(getComponentAt(x, y, true)); - } - - /** +--- java/src/charva/awt/Container.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/Container.java +@@ -89,6 +89,23 @@ public abstract class Container + invalidate(); + } + ++ public void setBounds(int top_, int left_, int bottom_, int right_) { ++ super.setBounds(top_, left_, bottom_, right_); ++ setSize(right_ - left_ + 1, bottom_ - top_ + 1); ++ } ++ ++ public void setBounds(Point topleft_, Dimension size_) { ++ super.setBounds(topleft_, size_); ++ setSize(size_); ++ } ++ ++ public void setBounds(Rectangle bounds) { ++ super.setBounds(bounds); ++ setSize( ++ bounds.getRight() - bounds.getLeft() + 1, ++ bounds.getBottom() - bounds.getTop() + 1); ++ } ++ + public Dimension minimumSize() { + if (_layoutMgr == null) + return _size; +@@ -105,13 +122,30 @@ public abstract class Container + return (Component) _components.elementAt(n); + } + ++ protected Component getComponentAt(int x, int y, boolean checkVisibility) { ++ Enumeration e = _components.elements(); ++ while (e.hasMoreElements()) { ++ Component c = (Component) e.nextElement(); ++ if ((!checkVisibility || c.isVisible()) && c.contains(x, y)) { ++ if (c instanceof Container) { ++ // Calculate the coordinates of the point relative ++ // to the origin of the container ++ Point origin = c.getLocation(); ++ return ((Container) c).getComponentAt(x - origin.x, y - origin.y, checkVisibility); ++ } else ++ return c; ++ } ++ } ++ return null; ++ } ++ + /** + * Returns the component that contains the specified point, or null + * if no component contains the point. The x and y coordinates of + * the point are relative to the origin of this container. + */ + public Component getComponentAt(Point p) { +- return getComponentAt(p.x, p.y); ++ return getComponentAt(p.x, p.y, false); + } + + /** +@@ -120,20 +154,27 @@ public abstract class Container + * the point are relative to the origin of this container. + */ + public Component getComponentAt(int x, int y) { +- Enumeration e = _components.elements(); +- while (e.hasMoreElements()) { +- Component c = (Component) e.nextElement(); +- if (c.contains(x, y)) { +- if (c instanceof Container) { +- // Calculate the coordinates of the point relative +- // to the origin of the container +- Point origin = c.getLocation(); +- return ((Container) c).getComponentAt(x - origin.x, y - origin.y); +- } else +- return c; +- } +- } +- return null; ++ return getComponentAt(x, y, false); ++ } ++ ++ /** ++ * Returns the visible component that contains the specified point, ++ * or null if no visible component contains the point. The x and y ++ * coordinates of the point are relative to the origin of this container. ++ */ ++ public final Component findComponentAt(Point p) { ++ return findComponentAt(p.x, p.y); ++ } ++ ++ /** ++ * Returns the visible component that contains the specified point, ++ * or null if no visible component contains the point. The x and y ++ * coordinates of the point are relative to the origin of this container. ++ */ ++ public final Component findComponentAt(int x, int y) { ++ if (!isRecursivelyVisible()) ++ return null; ++ return(getComponentAt(x, y, true)); + } + + /** diff --git a/devel/charva/files/patch-java_src_charva_awt_Toolkit.java b/devel/charva/files/patch-java_src_charva_awt_Toolkit.java index 99317c20df36..31e2304d6417 100644 --- a/devel/charva/files/patch-java_src_charva_awt_Toolkit.java +++ b/devel/charva/files/patch-java_src_charva_awt_Toolkit.java @@ -1,113 +1,113 @@ ---- java/src/charva/awt/Toolkit.java.orig Mon Aug 14 20:59:42 2006 -+++ java/src/charva/awt/Toolkit.java Mon Jan 29 09:39:30 2007 -@@ -157,13 +157,9 @@ public class Toolkit { - * key as defined in the "VK_*" values. - */ - public void fireKeystroke(int key_, Component source_) { -- int id; -- if (Toolkit.isActionKey(key_)) -- id = AWTEvent.KEY_TYPED; -- else -- id = AWTEvent.KEY_PRESSED; -- -- _evtQueue.postEvent(new KeyEvent(key_, id, source_)); -+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_PRESSED, source_)); -+ if (!Toolkit.isActionKey(key_)) -+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_TYPED, source_)); - } - - public FocusEvent getLastFocusEvent() { -@@ -225,7 +221,7 @@ public class Toolkit { - _lastMousePressTime = System.currentTimeMillis(); - - Component component = -- top_window.getComponentAt(x - origin.x, y - origin.y); -+ top_window.findComponentAt(x - origin.x, y - origin.y); - - if (component != null) { - _evtQueue.postEvent(new MouseEvent(component, modifiers, x, y, 0, button)); -@@ -796,43 +792,47 @@ public class Toolkit { - //public boolean isActionKey() { return (_key >= 256); } - public static boolean isActionKey( int _key ) - { -- boolean value = false; -- if ( _key == charva.awt.event.KeyEvent.VK_ESCAPE ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_DOWN ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_UP ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_LEFT ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_RIGHT ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_HOME ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_BACK_SPACE ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F1 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F2 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F3 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F4 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F5 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F6 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F7 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F8 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F9 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F10 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F11 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F12 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F13 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F14 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F15 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F16 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F17 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F18 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F19 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_F20 ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_DELETE ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_INSERT ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_DOWN ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_UP ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_ENTER ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_BACK_TAB ) value=true; -- if ( _key == charva.awt.event.KeyEvent.VK_END ) value=true; -- -- return (value); -+ switch (_key) { -+ case charva.awt.event.KeyEvent.VK_ESCAPE: -+ case charva.awt.event.KeyEvent.VK_DOWN: -+ case charva.awt.event.KeyEvent.VK_UP: -+ case charva.awt.event.KeyEvent.VK_LEFT: -+ case charva.awt.event.KeyEvent.VK_RIGHT: -+ case charva.awt.event.KeyEvent.VK_HOME: -+ case charva.awt.event.KeyEvent.VK_BACK_SPACE: -+ case charva.awt.event.KeyEvent.VK_F1: -+ case charva.awt.event.KeyEvent.VK_F2: -+ case charva.awt.event.KeyEvent.VK_F3: -+ case charva.awt.event.KeyEvent.VK_F4: -+ case charva.awt.event.KeyEvent.VK_F5: -+ case charva.awt.event.KeyEvent.VK_F6: -+ case charva.awt.event.KeyEvent.VK_F7: -+ case charva.awt.event.KeyEvent.VK_F8: -+ case charva.awt.event.KeyEvent.VK_F9: -+ case charva.awt.event.KeyEvent.VK_F10: -+ case charva.awt.event.KeyEvent.VK_F11: -+ case charva.awt.event.KeyEvent.VK_F12: -+ case charva.awt.event.KeyEvent.VK_F13: -+ case charva.awt.event.KeyEvent.VK_F14: -+ case charva.awt.event.KeyEvent.VK_F15: -+ case charva.awt.event.KeyEvent.VK_F16: -+ case charva.awt.event.KeyEvent.VK_F17: -+ case charva.awt.event.KeyEvent.VK_F18: -+ case charva.awt.event.KeyEvent.VK_F19: -+ case charva.awt.event.KeyEvent.VK_F20: -+ case charva.awt.event.KeyEvent.VK_DELETE: -+ case charva.awt.event.KeyEvent.VK_INSERT: -+ case charva.awt.event.KeyEvent.VK_PAGE_DOWN: -+ case charva.awt.event.KeyEvent.VK_PAGE_UP: -+ case charva.awt.event.KeyEvent.VK_ENTER: -+ case charva.awt.event.KeyEvent.VK_BACK_TAB: -+ case charva.awt.event.KeyEvent.VK_END: -+ return true; -+ default: -+ if ( _key < 32 ) -+ return true; -+ return false; -+ } - } - - //==================================================================== +--- java/src/charva/awt/Toolkit.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/Toolkit.java +@@ -157,13 +157,9 @@ public class Toolkit { + * key as defined in the "VK_*" values. + */ + public void fireKeystroke(int key_, Component source_) { +- int id; +- if (Toolkit.isActionKey(key_)) +- id = AWTEvent.KEY_TYPED; +- else +- id = AWTEvent.KEY_PRESSED; +- +- _evtQueue.postEvent(new KeyEvent(key_, id, source_)); ++ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_PRESSED, source_)); ++ if (!Toolkit.isActionKey(key_)) ++ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_TYPED, source_)); + } + + public FocusEvent getLastFocusEvent() { +@@ -225,7 +221,7 @@ public class Toolkit { + _lastMousePressTime = System.currentTimeMillis(); + + Component component = +- top_window.getComponentAt(x - origin.x, y - origin.y); ++ top_window.findComponentAt(x - origin.x, y - origin.y); + + if (component != null) { + _evtQueue.postEvent(new MouseEvent(component, modifiers, x, y, 0, button)); +@@ -796,43 +792,47 @@ public class Toolkit { + //public boolean isActionKey() { return (_key >= 256); } + public static boolean isActionKey( int _key ) + { +- boolean value = false; +- if ( _key == charva.awt.event.KeyEvent.VK_ESCAPE ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_DOWN ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_UP ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_LEFT ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_RIGHT ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_HOME ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_BACK_SPACE ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F1 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F2 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F3 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F4 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F5 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F6 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F7 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F8 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F9 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F10 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F11 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F12 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F13 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F14 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F15 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F16 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F17 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F18 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F19 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_F20 ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_DELETE ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_INSERT ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_DOWN ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_UP ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_ENTER ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_BACK_TAB ) value=true; +- if ( _key == charva.awt.event.KeyEvent.VK_END ) value=true; +- +- return (value); ++ switch (_key) { ++ case charva.awt.event.KeyEvent.VK_ESCAPE: ++ case charva.awt.event.KeyEvent.VK_DOWN: ++ case charva.awt.event.KeyEvent.VK_UP: ++ case charva.awt.event.KeyEvent.VK_LEFT: ++ case charva.awt.event.KeyEvent.VK_RIGHT: ++ case charva.awt.event.KeyEvent.VK_HOME: ++ case charva.awt.event.KeyEvent.VK_BACK_SPACE: ++ case charva.awt.event.KeyEvent.VK_F1: ++ case charva.awt.event.KeyEvent.VK_F2: ++ case charva.awt.event.KeyEvent.VK_F3: ++ case charva.awt.event.KeyEvent.VK_F4: ++ case charva.awt.event.KeyEvent.VK_F5: ++ case charva.awt.event.KeyEvent.VK_F6: ++ case charva.awt.event.KeyEvent.VK_F7: ++ case charva.awt.event.KeyEvent.VK_F8: ++ case charva.awt.event.KeyEvent.VK_F9: ++ case charva.awt.event.KeyEvent.VK_F10: ++ case charva.awt.event.KeyEvent.VK_F11: ++ case charva.awt.event.KeyEvent.VK_F12: ++ case charva.awt.event.KeyEvent.VK_F13: ++ case charva.awt.event.KeyEvent.VK_F14: ++ case charva.awt.event.KeyEvent.VK_F15: ++ case charva.awt.event.KeyEvent.VK_F16: ++ case charva.awt.event.KeyEvent.VK_F17: ++ case charva.awt.event.KeyEvent.VK_F18: ++ case charva.awt.event.KeyEvent.VK_F19: ++ case charva.awt.event.KeyEvent.VK_F20: ++ case charva.awt.event.KeyEvent.VK_DELETE: ++ case charva.awt.event.KeyEvent.VK_INSERT: ++ case charva.awt.event.KeyEvent.VK_PAGE_DOWN: ++ case charva.awt.event.KeyEvent.VK_PAGE_UP: ++ case charva.awt.event.KeyEvent.VK_ENTER: ++ case charva.awt.event.KeyEvent.VK_BACK_TAB: ++ case charva.awt.event.KeyEvent.VK_END: ++ return true; ++ default: ++ if ( _key < 32 ) ++ return true; ++ return false; ++ } + } + + //==================================================================== diff --git a/devel/charva/files/patch-java_src_charva_awt_VerticalFlowLayout.java b/devel/charva/files/patch-java_src_charva_awt_VerticalFlowLayout.java index 46dddb40df27..d6c6559ce44f 100644 --- a/devel/charva/files/patch-java_src_charva_awt_VerticalFlowLayout.java +++ b/devel/charva/files/patch-java_src_charva_awt_VerticalFlowLayout.java @@ -1,232 +1,232 @@ ---- java/src/charva/awt/VerticalFlowLayout.java.orig Mon Jan 29 09:39:30 2007 -+++ java/src/charva/awt/VerticalFlowLayout.java Mon Jan 29 09:39:30 2007 +--- java/src/charva/awt/VerticalFlowLayout.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/VerticalFlowLayout.java @@ -0,0 +1,229 @@ -+/* class FlowLayout -+ * -+ * Copyright (C) 2001 R M Pitman -+ * Copyright (C) 2007 Lapo Luchini -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+package charva.awt; -+ -+import java.util.Enumeration; -+import java.util.Vector; -+ -+/** -+ * A concrete implementation of LayoutManager that lays out its -+ * components top-to-bottom. -+ */ -+public class VerticalFlowLayout -+ implements LayoutManager { -+ /** -+ * Default constructor. Sets alignment to MIDDLE, hgap to 1, -+ * and vgap to 0. -+ */ -+ public VerticalFlowLayout() { -+ this(MIDDLE, 1, 0); -+ } -+ -+ /** -+ * Use this constructor when you want to set the alignment and the -+ * horizontal and vertical gaps. -+ */ -+ public VerticalFlowLayout(int align_, int hgap_, int vgap_) { -+ _align = align_; -+ _hgap = hgap_; -+ _vgap = vgap_; -+ } -+ -+ /** -+ * Sets the alignment for this layout. Allowable values are -+ * VerticalFlowLayout.TOP, VerticalFlowLayout.MIDDLE and -+ * VerticalFlowLayout.BOTTOM. -+ */ -+ public void setAlignment(int align_) { -+ _align = align_; -+ } -+ -+ /** -+ * Gets the alignment for this layout. -+ */ -+ public int getAlignment() { -+ return _align; -+ } -+ -+ /** -+ * Calculate the minimum-size rectangle that can enclose all the -+ * components in the given container. -+ */ -+ public Dimension minimumSize(Container container_) { -+ -+ int width = 0; -+ int height = 0; -+ -+ Component[] components = container_.getComponents(); -+ for (int i = 0; i < components.length; i++) { -+ Dimension d = components[i].minimumSize(); -+ -+ /* Make allowance for the gap between this component and the -+ * previous component. -+ */ -+ if (i != 0) -+ height += _vgap; -+ -+ height += d.height; -+ if (d.width > width) -+ width = d.width; -+ } -+ -+ /* Take into account the border frame (if any). -+ */ -+ Insets insets = container_.getInsets(); -+ height += insets.top + insets.bottom; -+ width += insets.left + insets.right; -+ -+ return new Dimension(width, height); -+ } -+ -+ /** -+ * Lay out the components according to the specified alignment, hgap -+ * and vgap. -+ * This is called when the size of the container has already been -+ * calculated. -+ * It lays out the components in a column, one at a time, until it -+ * determines that there is not enough space left in the column. -+ * Then it moves to the next row. If there is not enough horizontal -+ * space in the container to lay out all of the components, it -+ * removes the remaining components from the container; they don't -+ * appear at all. -+ */ -+ public void doLayout(Container container_) { -+ -+ Insets insets = container_.getInsets(); -+ int availableHeight = container_.getSize().height - -+ insets.top - insets.bottom; -+ int heightLeft = availableHeight; -+ int widthLeft = container_.getSize().width - -+ insets.left - insets.right; -+ -+ int hoffset = insets.left; -+ -+ Component[] components = container_.getComponents(); -+ Vector localvector = new Vector(); -+ for (int i = 0; i < components.length; i++) { -+ Component c = components[i]; -+ -+ /* Get the contained container to lay itself out at its -+ * preferred size, if it is not already laid out. -+ */ -+ if (c instanceof Container) { -+ Container cont = (Container) c; -+ if (cont.isValid() == false) { -+ cont.setSize(cont.minimumSize()); -+ cont.doLayout(); -+ } -+ } -+ -+ /* Determine the width required to lay out the current -+ * component (including the gap between this component and -+ * the previous component). -+ */ -+ int requiredHeight = c.getSize().height; -+ if (i != 0) -+ requiredHeight += _vgap; -+ -+ if (requiredHeight > heightLeft) { -+ int columnWidth = 0; -+ if (localvector.size() != 0) { -+ columnWidth = layoutColumn(container_, localvector, -+ widthLeft, heightLeft, hoffset); -+ localvector.removeAllElements(); -+ } -+ hoffset += columnWidth + _hgap; -+ heightLeft = availableHeight; -+ widthLeft -= columnWidth + _hgap; -+ } -+ heightLeft -= requiredHeight; -+ -+ // Build up a temporary list of components for this row. -+ localvector.add(c); -+ } -+ layoutColumn(container_, localvector, widthLeft, heightLeft, hoffset); -+ -+ } -+ -+ /** -+ * private function to layout a single column of components. -+ * -+ * @return The height of the laid-out column. -+ */ -+ private int layoutColumn(Container container_, Vector components_, -+ int widthleft_, int heightleft_, int hoffset_) { -+ -+ int voffset = 0; -+ int columnWidth = 0; -+ Insets insets = container_.getInsets(); -+ -+ switch (_align) { -+ case TOP: -+ voffset = insets.top; -+ break; -+ case MIDDLE: -+ voffset = insets.top + heightleft_ / 2; -+ break; -+ case BOTTOM: -+ voffset = insets.top + heightleft_; -+ break; -+ } -+ -+ Enumeration e = components_.elements(); -+ while (e.hasMoreElements()) { -+ Component c = (Component) e.nextElement(); -+ if (c.getSize().width > columnWidth) -+ columnWidth = c.getSize().width; -+ -+ if (columnWidth > widthleft_) { -+ container_.remove(c); // we have run out of space -+ continue; -+ } -+ -+ c.setLocation(hoffset_, voffset); -+ voffset += c.getSize().height + _vgap; -+ } -+ return columnWidth; -+ } -+ -+ //==================================================================== -+ // INSTANCE VARIABLES -+ -+ /** -+ * Alignment of components (TOP, BOTTOM or MIDDLE) -+ */ -+ private int _align = MIDDLE; -+ -+ /** -+ * Horizontal gap between components -+ */ -+ private int _hgap = 1; -+ -+ /** -+ * Vertical gap between components -+ */ -+ private int _vgap = 0; -+ -+ public static final int TOP = 1; -+ public static final int MIDDLE = 2; -+ public static final int BOTTOM = 3; -+ -+} ++/* class FlowLayout ++ * ++ * Copyright (C) 2001 R M Pitman ++ * Copyright (C) 2007 Lapo Luchini ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++package charva.awt; ++ ++import java.util.Enumeration; ++import java.util.Vector; ++ ++/** ++ * A concrete implementation of LayoutManager that lays out its ++ * components top-to-bottom. ++ */ ++public class VerticalFlowLayout ++ implements LayoutManager { ++ /** ++ * Default constructor. Sets alignment to MIDDLE, hgap to 1, ++ * and vgap to 0. ++ */ ++ public VerticalFlowLayout() { ++ this(MIDDLE, 1, 0); ++ } ++ ++ /** ++ * Use this constructor when you want to set the alignment and the ++ * horizontal and vertical gaps. ++ */ ++ public VerticalFlowLayout(int align_, int hgap_, int vgap_) { ++ _align = align_; ++ _hgap = hgap_; ++ _vgap = vgap_; ++ } ++ ++ /** ++ * Sets the alignment for this layout. Allowable values are ++ * VerticalFlowLayout.TOP, VerticalFlowLayout.MIDDLE and ++ * VerticalFlowLayout.BOTTOM. ++ */ ++ public void setAlignment(int align_) { ++ _align = align_; ++ } ++ ++ /** ++ * Gets the alignment for this layout. ++ */ ++ public int getAlignment() { ++ return _align; ++ } ++ ++ /** ++ * Calculate the minimum-size rectangle that can enclose all the ++ * components in the given container. ++ */ ++ public Dimension minimumSize(Container container_) { ++ ++ int width = 0; ++ int height = 0; ++ ++ Component[] components = container_.getComponents(); ++ for (int i = 0; i < components.length; i++) { ++ Dimension d = components[i].minimumSize(); ++ ++ /* Make allowance for the gap between this component and the ++ * previous component. ++ */ ++ if (i != 0) ++ height += _vgap; ++ ++ height += d.height; ++ if (d.width > width) ++ width = d.width; ++ } ++ ++ /* Take into account the border frame (if any). ++ */ ++ Insets insets = container_.getInsets(); ++ height += insets.top + insets.bottom; ++ width += insets.left + insets.right; ++ ++ return new Dimension(width, height); ++ } ++ ++ /** ++ * Lay out the components according to the specified alignment, hgap ++ * and vgap. ++ * This is called when the size of the container has already been ++ * calculated. ++ * It lays out the components in a column, one at a time, until it ++ * determines that there is not enough space left in the column. ++ * Then it moves to the next row. If there is not enough horizontal ++ * space in the container to lay out all of the components, it ++ * removes the remaining components from the container; they don't ++ * appear at all. ++ */ ++ public void doLayout(Container container_) { ++ ++ Insets insets = container_.getInsets(); ++ int availableHeight = container_.getSize().height - ++ insets.top - insets.bottom; ++ int heightLeft = availableHeight; ++ int widthLeft = container_.getSize().width - ++ insets.left - insets.right; ++ ++ int hoffset = insets.left; ++ ++ Component[] components = container_.getComponents(); ++ Vector localvector = new Vector(); ++ for (int i = 0; i < components.length; i++) { ++ Component c = components[i]; ++ ++ /* Get the contained container to lay itself out at its ++ * preferred size, if it is not already laid out. ++ */ ++ if (c instanceof Container) { ++ Container cont = (Container) c; ++ if (cont.isValid() == false) { ++ cont.setSize(cont.minimumSize()); ++ cont.doLayout(); ++ } ++ } ++ ++ /* Determine the width required to lay out the current ++ * component (including the gap between this component and ++ * the previous component). ++ */ ++ int requiredHeight = c.getSize().height; ++ if (i != 0) ++ requiredHeight += _vgap; ++ ++ if (requiredHeight > heightLeft) { ++ int columnWidth = 0; ++ if (localvector.size() != 0) { ++ columnWidth = layoutColumn(container_, localvector, ++ widthLeft, heightLeft, hoffset); ++ localvector.removeAllElements(); ++ } ++ hoffset += columnWidth + _hgap; ++ heightLeft = availableHeight; ++ widthLeft -= columnWidth + _hgap; ++ } ++ heightLeft -= requiredHeight; ++ ++ // Build up a temporary list of components for this row. ++ localvector.add(c); ++ } ++ layoutColumn(container_, localvector, widthLeft, heightLeft, hoffset); ++ ++ } ++ ++ /** ++ * private function to layout a single column of components. ++ * ++ * @return The height of the laid-out column. ++ */ ++ private int layoutColumn(Container container_, Vector components_, ++ int widthleft_, int heightleft_, int hoffset_) { ++ ++ int voffset = 0; ++ int columnWidth = 0; ++ Insets insets = container_.getInsets(); ++ ++ switch (_align) { ++ case TOP: ++ voffset = insets.top; ++ break; ++ case MIDDLE: ++ voffset = insets.top + heightleft_ / 2; ++ break; ++ case BOTTOM: ++ voffset = insets.top + heightleft_; ++ break; ++ } ++ ++ Enumeration e = components_.elements(); ++ while (e.hasMoreElements()) { ++ Component c = (Component) e.nextElement(); ++ if (c.getSize().width > columnWidth) ++ columnWidth = c.getSize().width; ++ ++ if (columnWidth > widthleft_) { ++ container_.remove(c); // we have run out of space ++ continue; ++ } ++ ++ c.setLocation(hoffset_, voffset); ++ voffset += c.getSize().height + _vgap; ++ } ++ return columnWidth; ++ } ++ ++ //==================================================================== ++ // INSTANCE VARIABLES ++ ++ /** ++ * Alignment of components (TOP, BOTTOM or MIDDLE) ++ */ ++ private int _align = MIDDLE; ++ ++ /** ++ * Horizontal gap between components ++ */ ++ private int _hgap = 1; ++ ++ /** ++ * Vertical gap between components ++ */ ++ private int _vgap = 0; ++ ++ public static final int TOP = 1; ++ public static final int MIDDLE = 2; ++ public static final int BOTTOM = 3; ++ ++} diff --git a/devel/charva/files/patch-java_src_charva_awt_Window.java b/devel/charva/files/patch-java_src_charva_awt_Window.java index 41f18aa85c09..84178c37cda2 100644 --- a/devel/charva/files/patch-java_src_charva_awt_Window.java +++ b/devel/charva/files/patch-java_src_charva_awt_Window.java @@ -1,56 +1,56 @@ ---- java/src/charva/awt/Window.java.orig Mon Aug 14 17:38:56 2006 -+++ java/src/charva/awt/Window.java Mon Jan 29 09:39:30 2007 -@@ -156,13 +156,21 @@ public class Window - */ - SyncQueue.getInstance().postEvent(new SyncEvent(this)); - -- if (_dispatchThreadRunning) -- run(); -- else { -- _dispatchThreadRunning = true; -- Thread dispatchThread = new Thread(this); -- dispatchThread.setName("event dispatcher"); -- dispatchThread.start(); -+ if (_dispatchThread != null) { -+ if (Thread.currentThread() == _dispatchThread) { -+ // we are in the EDT, we must manage events -+ run(); -+ } else { -+ // we are not the EDT, let's wait for him to ask us to close -+ synchronized (this) { -+ while (!_windowClosed) -+ try { wait(); } catch (InterruptedException e) { } -+ } -+ } -+ } else { -+ _dispatchThread = new Thread(this); -+ _dispatchThread.setName("event dispatcher"); -+ _dispatchThread.start(); - - /* If "charva.script.playback" is defined, we start up - * a thread for playing back the script. Keys from both the -@@ -270,7 +278,10 @@ public class Window - */ - if (we.getID() == AWTEvent.WINDOW_CLOSING) { - -- we.getWindow()._windowClosed = true; -+ synchronized (we.getWindow()) { -+ we.getWindow()._windowClosed = true; -+ we.getWindow().notify(); -+ } - - /* Remove this window from the list of those displayed, - * and blank out the screen area where the window was -@@ -407,10 +418,10 @@ public class Window - - private Window _owner; - protected Toolkit _term; -- private boolean _windowClosed = false; -+ private volatile boolean _windowClosed = false; - - private Vector _windowListeners = null; - -- private static boolean _dispatchThreadRunning = false; -+ private static Thread _dispatchThread = null; - - } +--- java/src/charva/awt/Window.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/Window.java +@@ -156,13 +156,21 @@ public class Window + */ + SyncQueue.getInstance().postEvent(new SyncEvent(this)); + +- if (_dispatchThreadRunning) +- run(); +- else { +- _dispatchThreadRunning = true; +- Thread dispatchThread = new Thread(this); +- dispatchThread.setName("event dispatcher"); +- dispatchThread.start(); ++ if (_dispatchThread != null) { ++ if (Thread.currentThread() == _dispatchThread) { ++ // we are in the EDT, we must manage events ++ run(); ++ } else { ++ // we are not the EDT, let's wait for him to ask us to close ++ synchronized (this) { ++ while (!_windowClosed) ++ try { wait(); } catch (InterruptedException e) { } ++ } ++ } ++ } else { ++ _dispatchThread = new Thread(this); ++ _dispatchThread.setName("event dispatcher"); ++ _dispatchThread.start(); + + /* If "charva.script.playback" is defined, we start up + * a thread for playing back the script. Keys from both the +@@ -270,7 +278,10 @@ public class Window + */ + if (we.getID() == AWTEvent.WINDOW_CLOSING) { + +- we.getWindow()._windowClosed = true; ++ synchronized (we.getWindow()) { ++ we.getWindow()._windowClosed = true; ++ we.getWindow().notify(); ++ } + + /* Remove this window from the list of those displayed, + * and blank out the screen area where the window was +@@ -407,10 +418,10 @@ public class Window + + private Window _owner; + protected Toolkit _term; +- private boolean _windowClosed = false; ++ private volatile boolean _windowClosed = false; + + private Vector _windowListeners = null; + +- private static boolean _dispatchThreadRunning = false; ++ private static Thread _dispatchThread = null; + + } diff --git a/devel/charva/files/patch-java_src_charva_awt_event_FocusAdapter.java b/devel/charva/files/patch-java_src_charva_awt_event_FocusAdapter.java index 5635c2e6bd8e..8369831a9ac6 100644 --- a/devel/charva/files/patch-java_src_charva_awt_event_FocusAdapter.java +++ b/devel/charva/files/patch-java_src_charva_awt_event_FocusAdapter.java @@ -1,20 +1,20 @@ ---- java/src/charva/awt/event/FocusAdapter.java.orig Mon Jan 29 09:39:30 2007 -+++ java/src/charva/awt/event/FocusAdapter.java Mon Jan 29 09:39:30 2007 +--- java/src/charva/awt/event/FocusAdapter.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charva/awt/event/FocusAdapter.java @@ -0,0 +1,17 @@ +package charva.awt.event; + +/** + * An abstract class for receiving key events. The methods provided in this + * class are empty; the class is provided as a convenience for implementing + * the KeyListener interface. You only have to implement the methods you + * are interested in. + */ +public abstract class FocusAdapter implements FocusListener { + + public void focusGained(FocusEvent fe) { + } + + public void focusLost(FocusEvent fe) { + } + +} diff --git a/devel/charva/files/patch-java_src_charvax_swing_AbstractButton.java b/devel/charva/files/patch-java_src_charvax_swing_AbstractButton.java index ecc8db0bdb9b..434d96c49e83 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_AbstractButton.java +++ b/devel/charva/files/patch-java_src_charvax_swing_AbstractButton.java @@ -1,90 +1,90 @@ ---- java/src/charvax/swing/AbstractButton.java.orig Sat Dec 17 15:27:30 2005 -+++ java/src/charvax/swing/AbstractButton.java Mon Jan 29 09:39:30 2007 +--- java/src/charvax/swing/AbstractButton.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/AbstractButton.java @@ -19,15 +19,16 @@ - - package charvax.swing; - -+import java.util.Enumeration; -+import java.util.Vector; -+ -+import charva.awt.Container; - import charva.awt.EventQueue; - import charva.awt.ItemSelectable; - import charva.awt.Toolkit; - import charva.awt.Window; - import charva.awt.event.*; - --import java.util.Enumeration; --import java.util.Vector; -- - /** - * This forms the base class for components that exhibit button-like - * behavior. -@@ -50,6 +51,12 @@ public abstract class AbstractButton - _label = label_; - } - -+ protected void addKeyListenerToAncestor() { -+ Window ancestor = super.getAncestorWindow(); -+ if (ancestor != null) -+ ancestor.addKeyListener(this); -+ } -+ - /** - * Set the button's mnemonic character. - * The mnemonic is the key which will activate this button if focus -@@ -76,10 +83,16 @@ public abstract class AbstractButton - */ - public void setMnemonic(int mnemonic_) { - _mnemonic = mnemonic_; -- Window ancestor = super.getAncestorWindow(); -- if (ancestor != null) { -- ancestor.addKeyListener(this); -- } -+ addKeyListenerToAncestor(); -+ } -+ -+ public void setParent(Container container_) { -+ if ((_mnemonic != 0) && (_parent != null) && (_parent.get() != null)) -+ throw new RuntimeException("Removal from previous parent currently not implemented"); -+ //removeKeyListenerFromAncestor(); -+ super.setParent(container_); -+ if (_mnemonic != 0) -+ addKeyListenerToAncestor(); - } - - /** -@@ -237,24 +250,23 @@ public abstract class AbstractButton - * character or a function key or cursor key was typed. - */ - public void keyPressed(KeyEvent ke_) { -- if (ke_.getKeyCode() == getMnemonic()) { -+ int code = ke_.getKeyCode(); -+ int mnem = getMnemonic(); -+ if (!ke_.isActionKey()) { -+ code = Character.toLowerCase(code); -+ mnem = Character.toLowerCase(mnem); -+ } -+ if (code == mnem) { - doClick(); - ke_.consume(); - } - } - - /** -- * Implements the KeyListener interface; this is called if a printable -- * (ASCII or ISO8859-1) character was typed. -+ * Implements the KeyListener interface; this is called only if a -+ * printable (ASCII or ISO8859-1) character was typed. - */ - public void keyTyped(KeyEvent ke_) { -- // We must accept either uppercase or lowercase mnemonic characters. -- char keyLower = Character.toLowerCase((char) ke_.getKeyChar()); -- char mnemonicLower = Character.toLowerCase((char) getMnemonic()); -- if (keyLower == mnemonicLower) { -- doClick(); -- ke_.consume(); -- } - } - - /** + + package charvax.swing; + ++import java.util.Enumeration; ++import java.util.Vector; ++ ++import charva.awt.Container; + import charva.awt.EventQueue; + import charva.awt.ItemSelectable; + import charva.awt.Toolkit; + import charva.awt.Window; + import charva.awt.event.*; + +-import java.util.Enumeration; +-import java.util.Vector; +- + /** + * This forms the base class for components that exhibit button-like + * behavior. +@@ -50,6 +51,12 @@ public abstract class AbstractButton + _label = label_; + } + ++ protected void addKeyListenerToAncestor() { ++ Window ancestor = super.getAncestorWindow(); ++ if (ancestor != null) ++ ancestor.addKeyListener(this); ++ } ++ + /** + * Set the button's mnemonic character. + * The mnemonic is the key which will activate this button if focus +@@ -76,10 +83,16 @@ public abstract class AbstractButton + */ + public void setMnemonic(int mnemonic_) { + _mnemonic = mnemonic_; +- Window ancestor = super.getAncestorWindow(); +- if (ancestor != null) { +- ancestor.addKeyListener(this); +- } ++ addKeyListenerToAncestor(); ++ } ++ ++ public void setParent(Container container_) { ++ if ((_mnemonic != 0) && (_parent != null) && (_parent.get() != null)) ++ throw new RuntimeException("Removal from previous parent currently not implemented"); ++ //removeKeyListenerFromAncestor(); ++ super.setParent(container_); ++ if (_mnemonic != 0) ++ addKeyListenerToAncestor(); + } + + /** +@@ -237,24 +250,23 @@ public abstract class AbstractButton + * character or a function key or cursor key was typed. + */ + public void keyPressed(KeyEvent ke_) { +- if (ke_.getKeyCode() == getMnemonic()) { ++ int code = ke_.getKeyCode(); ++ int mnem = getMnemonic(); ++ if (!ke_.isActionKey()) { ++ code = Character.toLowerCase(code); ++ mnem = Character.toLowerCase(mnem); ++ } ++ if (code == mnem) { + doClick(); + ke_.consume(); + } + } + + /** +- * Implements the KeyListener interface; this is called if a printable +- * (ASCII or ISO8859-1) character was typed. ++ * Implements the KeyListener interface; this is called only if a ++ * printable (ASCII or ISO8859-1) character was typed. + */ + public void keyTyped(KeyEvent ke_) { +- // We must accept either uppercase or lowercase mnemonic characters. +- char keyLower = Character.toLowerCase((char) ke_.getKeyChar()); +- char mnemonicLower = Character.toLowerCase((char) getMnemonic()); +- if (keyLower == mnemonicLower) { +- doClick(); +- ke_.consume(); +- } + } + + /** diff --git a/devel/charva/files/patch-java_src_charvax_swing_ButtonGroup.java b/devel/charva/files/patch-java_src_charvax_swing_ButtonGroup.java index a64a92dd2f20..b1dbcc7a39be 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_ButtonGroup.java +++ b/devel/charva/files/patch-java_src_charvax_swing_ButtonGroup.java @@ -1,26 +1,26 @@ ---- java/src/charvax/swing/ButtonGroup.java.orig 2005-12-17 15:27:30.000000000 +0100 -+++ java/src/charvax/swing/ButtonGroup.java 2009-11-16 10:26:42.000000000 +0100 -@@ -63,9 +63,10 @@ - * Adds the specified button to the group. - */ - public void add(AbstractButton button_) { -+ if (getSelection() != null) -+ button_.setSelected(false); - _buttons.add(button_); - button_.addItemListener(this); -- button_.setSelected(false); - } - - /** -@@ -133,10 +134,9 @@ - for (Enumeration e = _buttons.elements(); e.hasMoreElements();) { - - AbstractButton b = (AbstractButton) e.nextElement(); -- if (source != b || statechange != ItemEvent.SELECTED) { -+ if (source != b && statechange == ItemEvent.SELECTED) { - if (b.isSelected()) { - b._selected = false; -- b.setEnabled(true); - } - } - } +--- java/src/charvax/swing/ButtonGroup.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/ButtonGroup.java +@@ -63,9 +63,10 @@ public class ButtonGroup + * Adds the specified button to the group. + */ + public void add(AbstractButton button_) { ++ if (getSelection() != null) ++ button_.setSelected(false); + _buttons.add(button_); + button_.addItemListener(this); +- button_.setSelected(false); + } + + /** +@@ -133,10 +134,9 @@ public class ButtonGroup + for (Enumeration e = _buttons.elements(); e.hasMoreElements();) { + + AbstractButton b = (AbstractButton) e.nextElement(); +- if (source != b || statechange != ItemEvent.SELECTED) { ++ if (source != b && statechange == ItemEvent.SELECTED) { + if (b.isSelected()) { + b._selected = false; +- b.setEnabled(true); + } + } + } diff --git a/devel/charva/files/patch-java_src_charvax_swing_JLabel.java b/devel/charva/files/patch-java_src_charvax_swing_JLabel.java index 8abd344b235a..65704b0143c5 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_JLabel.java +++ b/devel/charva/files/patch-java_src_charvax_swing_JLabel.java @@ -1,47 +1,47 @@ ---- java/src/charvax/swing/JLabel.java.orig Sat Dec 17 15:27:30 2005 -+++ java/src/charvax/swing/JLabel.java Mon Jan 29 09:39:30 2007 +--- java/src/charvax/swing/JLabel.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/JLabel.java @@ -20,6 +20,7 @@ - package charvax.swing; - - import charva.awt.Dimension; -+import charva.awt.Font; - import charva.awt.Insets; - import charva.awt.Point; - import charva.awt.Toolkit; -@@ -79,6 +80,10 @@ public class JLabel - // Draw the border if it exists - super.draw(); - -+ int attrib = 0; -+ if (_bold) -+ attrib |= Toolkit.A_BOLD; -+ - /* Get the absolute origin of this component. - */ - Point origin = getLocationOnScreen(); -@@ -98,7 +103,7 @@ public class JLabel - buf.setLength(_width); // truncate - - int colorpair = getCursesColor(); -- term.addString(buf.toString(), 0, colorpair); -+ term.addString(buf.toString(), attrib, colorpair); - } - - /** -@@ -169,10 +174,16 @@ public class JLabel - return "JLabel: [" + getText() + "]"; - } - -+ public void setFont(Font font_) { -+ _bold = ((font_.getStyle() & Font.BOLD) != 0); -+ } -+ - //==================================================================== - // INSTANCE VARIABLES - - private String _labeltext; - private int _width; -+ -+ protected boolean _bold = false; - - } + package charvax.swing; + + import charva.awt.Dimension; ++import charva.awt.Font; + import charva.awt.Insets; + import charva.awt.Point; + import charva.awt.Toolkit; +@@ -79,6 +80,10 @@ public class JLabel + // Draw the border if it exists + super.draw(); + ++ int attrib = 0; ++ if (_bold) ++ attrib |= Toolkit.A_BOLD; ++ + /* Get the absolute origin of this component. + */ + Point origin = getLocationOnScreen(); +@@ -98,7 +103,7 @@ public class JLabel + buf.setLength(_width); // truncate + + int colorpair = getCursesColor(); +- term.addString(buf.toString(), 0, colorpair); ++ term.addString(buf.toString(), attrib, colorpair); + } + + /** +@@ -169,10 +174,16 @@ public class JLabel + return "JLabel: [" + getText() + "]"; + } + ++ public void setFont(Font font_) { ++ _bold = ((font_.getStyle() & Font.BOLD) != 0); ++ } ++ + //==================================================================== + // INSTANCE VARIABLES + + private String _labeltext; + private int _width; + ++ protected boolean _bold = false; ++ + } diff --git a/devel/charva/files/patch-java_src_charvax_swing_JPasswordField.java b/devel/charva/files/patch-java_src_charvax_swing_JPasswordField.java index 5da15a49530f..67a52ec20271 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_JPasswordField.java +++ b/devel/charva/files/patch-java_src_charvax_swing_JPasswordField.java @@ -1,14 +1,14 @@ ---- java/src/charvax/swing/JPasswordField.java.orig Sat Dec 17 15:27:30 2005 -+++ java/src/charvax/swing/JPasswordField.java Mon Jan 29 09:39:30 2007 -@@ -133,8 +133,10 @@ public class JPasswordField - * UNDERLINE attribute. - */ - int attrib = 0; -- if (super._enabled) -+ if (_enabled) - attrib |= Toolkit.A_UNDERLINE; -+ if (_bold) -+ attrib |= Toolkit.A_BOLD; - - term.setCursor(origin); - term.addString(_padding, attrib, colorpair); +--- java/src/charvax/swing/JPasswordField.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/JPasswordField.java +@@ -133,8 +133,10 @@ public class JPasswordField + * UNDERLINE attribute. + */ + int attrib = 0; +- if (super._enabled) ++ if (_enabled) + attrib |= Toolkit.A_UNDERLINE; ++ if (_bold) ++ attrib |= Toolkit.A_BOLD; + + term.setCursor(origin); + term.addString(_padding, attrib, colorpair); diff --git a/devel/charva/files/patch-java_src_charvax_swing_JTextArea.java b/devel/charva/files/patch-java_src_charvax_swing_JTextArea.java index e81f770de064..cfff4704fae8 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_JTextArea.java +++ b/devel/charva/files/patch-java_src_charvax_swing_JTextArea.java @@ -1,40 +1,40 @@ ---- java/src/charvax/swing/JTextArea.java.orig Fri Dec 30 16:14:22 2005 -+++ java/src/charvax/swing/JTextArea.java Mon Jan 29 09:39:30 2007 -@@ -412,6 +412,10 @@ public class JTextArea - Point tempCaret = null; - Point caret = _caret; - -+ int attrib = 0; -+ if (_bold) -+ attrib |= Toolkit.A_BOLD; -+ - /* Get the absolute origin of this component. - */ - Point origin = getLocationOnScreen(); -@@ -458,7 +462,7 @@ public class JTextArea - _rows++; - term.setCursor(origin.addOffset(col, row)); - } else { -- term.addChar(chr, 0, colorpair); -+ term.addChar(chr, attrib, colorpair); - col++; - } - } else { // We have reached the right-hand column. -@@ -470,7 +474,7 @@ public class JTextArea - _rows++; - term.setCursor(origin.addOffset(col, row)); - } else { -- term.addChar(chr, 0, colorpair); -+ term.addChar(chr, attrib, colorpair); - col++; - _columns++; - } -@@ -482,7 +486,7 @@ public class JTextArea - _rows++; - term.setCursor(origin.addOffset(col, row)); - if (chr != '\n') // thanks to Chris Rogers for this -- term.addChar(chr, 0, colorpair); -+ term.addChar(chr, attrib, colorpair); - } else { - /* We must back-track until we get to whitespace, so - * that we can move the word to the next line. +--- java/src/charvax/swing/JTextArea.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/JTextArea.java +@@ -412,6 +412,10 @@ public class JTextArea + Point tempCaret = null; + Point caret = _caret; + ++ int attrib = 0; ++ if (_bold) ++ attrib |= Toolkit.A_BOLD; ++ + /* Get the absolute origin of this component. + */ + Point origin = getLocationOnScreen(); +@@ -458,7 +462,7 @@ public class JTextArea + _rows++; + term.setCursor(origin.addOffset(col, row)); + } else { +- term.addChar(chr, 0, colorpair); ++ term.addChar(chr, attrib, colorpair); + col++; + } + } else { // We have reached the right-hand column. +@@ -470,7 +474,7 @@ public class JTextArea + _rows++; + term.setCursor(origin.addOffset(col, row)); + } else { +- term.addChar(chr, 0, colorpair); ++ term.addChar(chr, attrib, colorpair); + col++; + _columns++; + } +@@ -482,7 +486,7 @@ public class JTextArea + _rows++; + term.setCursor(origin.addOffset(col, row)); + if (chr != '\n') // thanks to Chris Rogers for this +- term.addChar(chr, 0, colorpair); ++ term.addChar(chr, attrib, colorpair); + } else { + /* We must back-track until we get to whitespace, so + * that we can move the word to the next line. diff --git a/devel/charva/files/patch-java_src_charvax_swing_JTextField.java b/devel/charva/files/patch-java_src_charvax_swing_JTextField.java index f6878151f29f..1b1c9f41f770 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_JTextField.java +++ b/devel/charva/files/patch-java_src_charvax_swing_JTextField.java @@ -1,43 +1,43 @@ ---- java/src/charvax/swing/JTextField.java.orig Fri Dec 30 16:15:12 2005 -+++ java/src/charvax/swing/JTextField.java Mon Jan 29 09:39:30 2007 -@@ -118,11 +118,6 @@ public class JTextField - return _columns; - } - -- public void setFont(Font font_) { -- _bold = ((font_.getStyle() & Font.BOLD) != 0); -- } -- -- - /** - * Set the action command - */ -@@ -189,9 +184,8 @@ public class JTextField - * UNDERLINE attribute. - */ - int attrib = 0; -- if (super._enabled) -+ if (_enabled) - attrib |= Toolkit.A_UNDERLINE; -- - if (_bold) - attrib |= Toolkit.A_BOLD; - -@@ -247,7 +241,7 @@ public class JTextField - - /* - */ -- if (ke_.isActionKey() == false) { -+ if (!ke_.isActionKey() && (ke_.getID() == KeyEvent.KEY_TYPED)) { - - /* If it is a control character, ignore it. - * @todo Do something more useful with control chars. -@@ -414,8 +408,6 @@ public class JTextField - - //==================================================================== - // INSTANCE VARIABLES -- -- protected boolean _bold = false; - - protected int _columns; - +--- java/src/charvax/swing/JTextField.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/JTextField.java +@@ -118,11 +118,6 @@ public class JTextField + return _columns; + } + +- public void setFont(Font font_) { +- _bold = ((font_.getStyle() & Font.BOLD) != 0); +- } +- +- + /** + * Set the action command + */ +@@ -189,9 +184,8 @@ public class JTextField + * UNDERLINE attribute. + */ + int attrib = 0; +- if (super._enabled) ++ if (_enabled) + attrib |= Toolkit.A_UNDERLINE; +- + if (_bold) + attrib |= Toolkit.A_BOLD; + +@@ -247,7 +241,7 @@ public class JTextField + + /* + */ +- if (ke_.isActionKey() == false) { ++ if (!ke_.isActionKey() && (ke_.getID() == KeyEvent.KEY_TYPED)) { + + /* If it is a control character, ignore it. + * @todo Do something more useful with control chars. +@@ -415,8 +409,6 @@ public class JTextField + //==================================================================== + // INSTANCE VARIABLES + +- protected boolean _bold = false; +- + protected int _columns; + + /** diff --git a/devel/charva/files/patch-java_src_charvax_swing_text_JTextComponent.java b/devel/charva/files/patch-java_src_charvax_swing_text_JTextComponent.java index eadcdd1b2681..c4ad44fc56aa 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_text_JTextComponent.java +++ b/devel/charva/files/patch-java_src_charvax_swing_text_JTextComponent.java @@ -1,28 +1,28 @@ ---- java/src/charvax/swing/text/JTextComponent.java.orig Sat Dec 17 15:27:30 2005 -+++ java/src/charvax/swing/text/JTextComponent.java Mon Jan 29 09:39:30 2007 +--- java/src/charvax/swing/text/JTextComponent.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/text/JTextComponent.java @@ -19,6 +19,7 @@ - - package charvax.swing.text; - -+import charva.awt.Font; - import charvax.swing.JComponent; - - /** -@@ -72,6 +73,10 @@ public abstract class JTextComponent - _editable = editable_; - } - -+ public void setFont(Font font_) { -+ _bold = ((font_.getStyle() & Font.BOLD) != 0); -+ } -+ - //==================================================================== - // INSTANCE VARIABLES - -@@ -84,4 +89,6 @@ public abstract class JTextComponent - protected StringBuffer _document; - - protected boolean _editable = true; -+ -+ protected boolean _bold = false; - } + + package charvax.swing.text; + ++import charva.awt.Font; + import charvax.swing.JComponent; + + /** +@@ -72,6 +73,10 @@ public abstract class JTextComponent + _editable = editable_; + } + ++ public void setFont(Font font_) { ++ _bold = ((font_.getStyle() & Font.BOLD) != 0); ++ } ++ + //==================================================================== + // INSTANCE VARIABLES + +@@ -84,4 +89,6 @@ public abstract class JTextComponent + protected StringBuffer _document; + + protected boolean _editable = true; ++ ++ protected boolean _bold = false; + } diff --git a/devel/flickrnet/Makefile b/devel/flickrnet/Makefile index 038906df56b4..f1a5f8c6ab09 100644 --- a/devel/flickrnet/Makefile +++ b/devel/flickrnet/Makefile @@ -1,26 +1,27 @@ # Created by: Romain Tartiere # $FreeBSD$ PORTNAME= flickrnet PORTVERSION= 2.2.0 PORTEPOCH= 1 CATEGORIES= devel MASTER_SITES= http://romain.blogreen.org/distfiles/ DISTNAME= FlickrNet${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}-Src-48055 MAINTAINER= ports@FreeBSD.org COMMENT= Flickr .Net API Library -USES= mono zip +USES= dos2unix mono zip +DOS2UNIX_GLOB= *.cs WRKSRC= ${WRKDIR}/FlickrNet do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/mcs -t:library -out:FlickrNet.dll -r:System.Data -r:System.Web -r:System.Drawing *.cs do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/mono/flickrnet cd ${WRKSRC} && ${INSTALL_DATA} FlickrNet.dll ${STAGEDIR}${PREFIX}/lib/mono/flickrnet cd ${WRKSRC} && ${SED} -e 's|@prefix@|${PREFIX}|' < flickrnet.pc.in > flickrnet.pc cd ${WRKSRC} && ${INSTALL_DATA} flickrnet.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig .include diff --git a/devel/flickrnet/files/patch-AssemblyInfo.cs b/devel/flickrnet/files/patch-AssemblyInfo.cs index 539b0e08e8d8..d01cf9044a40 100644 --- a/devel/flickrnet/files/patch-AssemblyInfo.cs +++ b/devel/flickrnet/files/patch-AssemblyInfo.cs @@ -1,16 +1,11 @@ ---- AssemblyInfo.cs.orig +--- AssemblyInfo.cs.orig 2016-06-20 14:46:51 UTC +++ AssemblyInfo.cs -@@ -61,10 +61,10 @@ - [assembly: AssemblyKeyName("")] - - #if !WindowsCE --[assembly: AssemblyKeyFile("..\\..\\FlickrNet.snk")] -+[assembly: AssemblyKeyFile("FlickrNet.snk")] - [assembly: AllowPartiallyTrustedCallers()] - [assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)] - #endif - - [assembly: CLSCompliantAttribute(true)] --[assembly: ComVisible(false)] -\ No newline at end of file -+[assembly: ComVisible(false)] +@@ -61,7 +61,7 @@ using System.Runtime.InteropServices; + [assembly: AssemblyKeyName("")] + + #if !WindowsCE +-[assembly: AssemblyKeyFile("..\\..\\FlickrNet.snk")] ++[assembly: AssemblyKeyFile("FlickrNet.snk")] + [assembly: AllowPartiallyTrustedCallers()] + [assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)] + #endif diff --git a/devel/flickrnet/files/patch-flickrnet.pc.in b/devel/flickrnet/files/patch-flickrnet.pc.in index 231a427dde4c..e080169ef67d 100644 --- a/devel/flickrnet/files/patch-flickrnet.pc.in +++ b/devel/flickrnet/files/patch-flickrnet.pc.in @@ -1,11 +1,11 @@ ---- /dev/null +--- flickrnet.pc.in.orig 2016-06-20 14:46:51 UTC +++ flickrnet.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib + +Name: Flickr .Net API Library +Description: FlickrNet +Version: 2.1.5 +Libs: -r:${libdir}/mono/flickrnet/FlickrNet.dll diff --git a/devel/itext/Makefile b/devel/itext/Makefile index f1a1ef62eb5b..e2d06ca375be 100644 --- a/devel/itext/Makefile +++ b/devel/itext/Makefile @@ -1,60 +1,61 @@ # Created by: Ying-Chieh Liao # $FreeBSD$ PORTNAME= itext PORTVERSION= 4.2.0 PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= devel java MASTER_SITES= LOCAL/ale MAINTAINER= ale@FreeBSD.org COMMENT= Java-PDF Library LICENSE= MPL LGPL20 LICENSE_COMB= dual BUILD_DEPENDS= ${JAVAJARDIR}/bcmail.jar:java/bouncycastle \ ${JAVAJARDIR}/dom4j.jar:textproc/dom4j \ ${JAVAJARDIR}/pdf-renderer.jar:print/pdf-renderer RUN_DEPENDS= ${JAVAJARDIR}/bcmail.jar:java/bouncycastle \ ${JAVAJARDIR}/dom4j.jar:textproc/dom4j \ ${JAVAJARDIR}/pdf-renderer.jar:print/pdf-renderer OPTIONS_DEFINE= DOCS -USES= tar:bzip2 +USES= dos2unix tar:bzip2 +DOS2UNIX_GLOB= *.java USE_JAVA= yes JAVA_VERSION= 1.6+ USE_ANT= yes ALL_TARGET= jar jar.rtf jar.rups MAKE_ENV= ANT_INCLUDE_SHARED_JARS=YES PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar \ %%JAVAJARDIR%%/${PORTNAME}-rtf.jar \ %%JAVAJARDIR%%/${PORTNAME}-rups.jar \ bin/${PORTNAME}-rups PORTDOCS= * .include .if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc .endif do-install: @${INSTALL_DATA} ${WRKDIR}/lib/iText.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar @${INSTALL_DATA} ${WRKDIR}/lib/iText-rtf.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}-rtf.jar @${INSTALL_DATA} ${WRKDIR}/lib/iText-rups.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}-rups.jar @${INSTALL_SCRIPT} ${FILESDIR}/${PORTNAME}-rups \ ${STAGEDIR}${PREFIX}/bin/ .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR}/apidocs (cd ${WRKDIR}/build/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/apidocs) .endif .include diff --git a/devel/itext/files/patch-ant_.ant.properties b/devel/itext/files/patch-ant_.ant.properties index 485a242a2fd7..b4a724d540e9 100644 --- a/devel/itext/files/patch-ant_.ant.properties +++ b/devel/itext/files/patch-ant_.ant.properties @@ -1,11 +1,11 @@ ---- ant/.ant.properties.orig 2010-01-12 10:03:11.000000000 +0100 -+++ ant/.ant.properties 2010-01-12 10:05:47.000000000 +0100 -@@ -3,7 +3,7 @@ +--- ant/.ant.properties.orig 2009-11-27 12:59:39 UTC ++++ ant/.ant.properties +@@ -3,7 +3,7 @@ releasedate=2009-11-27 itext.home=../.. -itext.src=${itext.home}/src +itext.src=${itext.home}/itext-${releasenumber} itext.www=${itext.home}/www itext.build=${itext.home}/build itext.lib=${itext.home}/lib diff --git a/devel/itext/files/patch-ant_compile.xml b/devel/itext/files/patch-ant_compile.xml index a2e382df3e07..66c2e586c740 100644 --- a/devel/itext/files/patch-ant_compile.xml +++ b/devel/itext/files/patch-ant_compile.xml @@ -1,20 +1,20 @@ ---- ant/compile.xml.orig 2009-06-08 02:50:15.000000000 +0200 -+++ ant/compile.xml 2011-11-24 20:55:01.000000000 +0100 +--- ant/compile.xml.orig 2009-06-08 00:50:15 UTC ++++ ant/compile.xml @@ -92,11 +92,17 @@ + + + + + + diff --git a/devel/itext/files/patch-ant_site.xml b/devel/itext/files/patch-ant_site.xml index 74941b60a43c..feaa67895591 100644 --- a/devel/itext/files/patch-ant_site.xml +++ b/devel/itext/files/patch-ant_site.xml @@ -1,11 +1,11 @@ ---- ant/site.xml.orig 2014-06-05 07:50:18.377016755 +0000 -+++ ant/site.xml 2014-06-05 07:49:27.026098152 +0000 +--- ant/site.xml.orig 2009-06-08 00:50:15 UTC ++++ ant/site.xml @@ -65,7 +65,7 @@ + private="true" encoding="utf-8"> diff --git a/devel/itext/files/patch-core_com_lowagie_text_pdf_PRTokeniser.java b/devel/itext/files/patch-core_com_lowagie_text_pdf_PRTokeniser.java index b9d3044f4773..15ae507fe6ae 100644 --- a/devel/itext/files/patch-core_com_lowagie_text_pdf_PRTokeniser.java +++ b/devel/itext/files/patch-core_com_lowagie_text_pdf_PRTokeniser.java @@ -1,15 +1,15 @@ ---- core/com/lowagie/text/pdf/PRTokeniser.java.orig 2012-07-03 16:02:24.000000000 +0200 -+++ core/com/lowagie/text/pdf/PRTokeniser.java 2012-07-03 16:03:30.000000000 +0200 -@@ -281,6 +281,12 @@ +--- core/com/lowagie/text/pdf/PRTokeniser.java.orig 2016-06-20 15:02:42 UTC ++++ core/com/lowagie/text/pdf/PRTokeniser.java +@@ -281,6 +281,12 @@ public class PRTokeniser { } } } + if (level > 0) { + file.seek(ptr); + type = TK_NUMBER; + stringValue = n1; + return; + } // if we hit here, the file is either corrupt (stream ended unexpectedly), // or the last token ended exactly at the end of a stream. This last // case can occur inside an Object Stream. diff --git a/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfReader.java b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfReader.java index 270aa60a4876..3ea8d60aaabe 100644 --- a/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfReader.java +++ b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfReader.java @@ -1,11 +1,11 @@ ---- core/com/lowagie/text/pdf/PdfReader.java.orig 2012-01-27 11:27:08.000000000 +0100 -+++ core/com/lowagie/text/pdf/PdfReader.java 2012-01-27 11:27:41.000000000 +0100 -@@ -1464,7 +1464,7 @@ +--- core/com/lowagie/text/pdf/PdfReader.java.orig 2016-06-20 15:02:42 UTC ++++ core/com/lowagie/text/pdf/PdfReader.java +@@ -1464,7 +1464,7 @@ public class PdfReader implements PdfVie } } thisStream *= 2; - if (thisStream < xref.length) + if (thisStream < xref.length && xref[thisStream] == 0 && xref[thisStream + 1] == 0) xref[thisStream] = -1; if (prev == -1) diff --git a/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java index 611d5122a57b..4a831740f244 100644 --- a/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java +++ b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java @@ -1,22 +1,22 @@ ---- core/com/lowagie/text/pdf/PdfStamperImp.java.orig 2009-11-16 13:48:42.000000000 +0100 -+++ core/com/lowagie/text/pdf/PdfStamperImp.java 2012-07-12 10:27:01.000000000 +0200 -@@ -208,8 +208,17 @@ +--- core/com/lowagie/text/pdf/PdfStamperImp.java.orig 2016-06-20 15:02:42 UTC ++++ core/com/lowagie/text/pdf/PdfStamperImp.java +@@ -208,8 +208,17 @@ class PdfStamperImp extends PdfWriter { } // metadata int skipInfo = -1; - PRIndirectReference iInfo = (PRIndirectReference)reader.getTrailer().get(PdfName.INFO); - PdfDictionary oldInfo = (PdfDictionary)PdfReader.getPdfObject(iInfo); + PRIndirectReference iInfo = null; + PdfDictionary oldInfo; + PdfObject dictInfo = reader.getTrailer().get(PdfName.INFO); + // Info dictionary in the trailer shall be an indirect reference, + // but a few broken softwares put it inline + if (dictInfo instanceof PdfDictionary) { + oldInfo = (PdfDictionary) dictInfo; + } else { + iInfo = (PRIndirectReference) dictInfo; + oldInfo = (PdfDictionary)PdfReader.getPdfObject(iInfo); + } String producer = null; if (iInfo != null) skipInfo = iInfo.getNumber(); diff --git a/devel/itext/files/patch-core_com_lowagie_text_xml_xmp_XmpReader.java b/devel/itext/files/patch-core_com_lowagie_text_xml_xmp_XmpReader.java index f4fee55a92de..865385e5d65e 100644 --- a/devel/itext/files/patch-core_com_lowagie_text_xml_xmp_XmpReader.java +++ b/devel/itext/files/patch-core_com_lowagie_text_xml_xmp_XmpReader.java @@ -1,23 +1,23 @@ ---- core/com/lowagie/text/xml/xmp/XmpReader.java.orig 2011-11-24 16:34:23.000000000 +0100 -+++ core/com/lowagie/text/xml/xmp/XmpReader.java 2011-11-24 16:41:54.000000000 +0100 -@@ -103,8 +103,19 @@ - public boolean replace(String namespaceURI, String localName, String value) { - NodeList nodes = domDocument.getElementsByTagNameNS(namespaceURI, localName); - Node node; -- if (nodes.getLength() == 0) -+ if (nodes.getLength() == 0) { -+ nodes = domDocument.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "Description"); -+ if (nodes.getLength() == 0) return false; -+ for (int i = 0; i < nodes.getLength(); i++) { -+ node = nodes.item(i); -+ Node attribute = node.getAttributes().getNamedItemNS(namespaceURI, localName); -+ if (attribute != null) { -+ attribute.setNodeValue(value); -+ return true; -+ } -+ } - return false; -+ } - for (int i = 0; i < nodes.getLength(); i++) { - node = nodes.item(i); - setNodeText(domDocument, node, value); +--- core/com/lowagie/text/xml/xmp/XmpReader.java.orig 2016-06-20 15:02:42 UTC ++++ core/com/lowagie/text/xml/xmp/XmpReader.java +@@ -103,8 +103,19 @@ public class XmpReader { + public boolean replace(String namespaceURI, String localName, String value) { + NodeList nodes = domDocument.getElementsByTagNameNS(namespaceURI, localName); + Node node; +- if (nodes.getLength() == 0) ++ if (nodes.getLength() == 0) { ++ nodes = domDocument.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "Description"); ++ if (nodes.getLength() == 0) return false; ++ for (int i = 0; i < nodes.getLength(); i++) { ++ node = nodes.item(i); ++ Node attribute = node.getAttributes().getNamedItemNS(namespaceURI, localName); ++ if (attribute != null) { ++ attribute.setNodeValue(value); ++ return true; ++ } ++ } + return false; ++ } + for (int i = 0; i < nodes.getLength(); i++) { + node = nodes.item(i); + setNodeText(domDocument, node, value); diff --git a/devel/p5-Geo-ShapeFile/Makefile b/devel/p5-Geo-ShapeFile/Makefile index 060d04cb2cca..a3dccb7dc9ad 100644 --- a/devel/p5-Geo-ShapeFile/Makefile +++ b/devel/p5-Geo-ShapeFile/Makefile @@ -1,24 +1,25 @@ # Created by: estith # $FreeBSD$ PORTNAME= Geo-ShapeFile PORTVERSION= 2.61 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- MAINTAINER= culot@FreeBSD.org COMMENT= Perl extension for handling ESRI GIS Shapefiles LICENSE= ART10 GPLv1 LICENSE_COMB= dual BUILD_DEPENDS= p5-Tree-R>0:devel/p5-Tree-R \ p5-autovivification>0:devel/p5-autovivification RUN_DEPENDS:= ${BUILD_DEPENDS} NO_ARCH= yes -USES= perl5 +USES= dos2unix perl5 +DOS2UNIX_GLOB= *.pm *.pl *.t USE_PERL5= configure .include diff --git a/devel/p5-Geo-ShapeFile/files/patch-t_main__tests.t b/devel/p5-Geo-ShapeFile/files/patch-t_main__tests.t index cc100bfbb574..5e6b323e972e 100644 --- a/devel/p5-Geo-ShapeFile/files/patch-t_main__tests.t +++ b/devel/p5-Geo-ShapeFile/files/patch-t_main__tests.t @@ -1,14 +1,14 @@ ---- t/main_tests.t.orig 2015-10-16 16:34:06.906634577 +0200 -+++ t/main_tests.t 2015-10-16 16:34:56.598631573 +0200 +--- t/main_tests.t.orig 2016-06-20 14:43:13 UTC ++++ t/main_tests.t @@ -3,7 +3,10 @@ - use Test::More; - use strict; - use warnings; --use rlib '../lib', './lib'; -+#use rlib '../lib', './lib'; -+use FindBin; -+use lib "$FindBin::Bin/lib"; -+use lib "$FindBin::Bin/../lib"; - - use Geo::ShapeFile; - use Geo::ShapeFile::Shape; + use Test::More; + use strict; + use warnings; +-use rlib '../lib', './lib'; ++#use rlib '../lib', './lib'; ++use FindBin; ++use lib "$FindBin::Bin/lib"; ++use lib "$FindBin::Bin/../lib"; + + use Geo::ShapeFile; + use Geo::ShapeFile::Shape; diff --git a/devel/p5-Sys-Cpu/Makefile b/devel/p5-Sys-Cpu/Makefile index f792414859f3..60c666bf001e 100644 --- a/devel/p5-Sys-Cpu/Makefile +++ b/devel/p5-Sys-Cpu/Makefile @@ -1,17 +1,17 @@ # Created by: Terry Sposato # $FreeBSD$ PORTNAME= Sys-CPU PORTVERSION= 0.52 PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- MAINTAINER= terry@sucked-in.com COMMENT= Sys::CPU - Perl extension for getting CPU information -USES= perl5 +USES= dos2unix perl5 USE_PERL5= configure .include diff --git a/devel/p5-Sys-Cpu/files/patch-CPU.xs b/devel/p5-Sys-Cpu/files/patch-CPU.xs index ba4ae3ca5fdb..839bdb22303f 100644 --- a/devel/p5-Sys-Cpu/files/patch-CPU.xs +++ b/devel/p5-Sys-Cpu/files/patch-CPU.xs @@ -1,36 +1,36 @@ ---- CPU.xs.orig 2010-09-03 23:30:18.000000000 +0100 -+++ CPU.xs 2010-09-03 23:57:31.000000000 +0100 -@@ -40,6 +40,11 @@ - #define _have_cpu_clock - #define _have_cpu_type - #endif -+#ifdef __FreeBSD__ -+ #include -+ #define _have_cpu_type -+ #define _have_cpu_clock -+#endif - #ifdef WINDOWS - /* Registry Functions */ - -@@ -317,6 +322,10 @@ - int value = proc_cpuinfo_clock(); - if (value) clock = value; - #endif -+#ifdef __FreeBSD__ -+ size_t len = sizeof(clock); -+ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0); -+#endif - #ifdef WINDOWS - char *clock_str = malloc(MAX_IDENT_SIZE); - /*!! untested !!*/ -@@ -356,6 +365,10 @@ - { - char *value = malloc(MAX_IDENT_SIZE); - int retcode = 0; -+#ifdef __FreeBSD__ -+ size_t len = MAX_IDENT_SIZE; -+ sysctlbyname("hw.model", value, &len, NULL, 0); -+#endif - #ifdef __linux__ - value = proc_cpuinfo_field ("model name"); - if (!value) value = proc_cpuinfo_field ("machine"); +--- CPU.xs.orig 2016-06-20 15:01:16 UTC ++++ CPU.xs +@@ -40,6 +40,11 @@ + #define _have_cpu_clock + #define _have_cpu_type + #endif ++#ifdef __FreeBSD__ ++ #include ++ #define _have_cpu_type ++ #define _have_cpu_clock ++#endif + #ifdef WINDOWS + /* Registry Functions */ + +@@ -317,6 +322,10 @@ CODE: + int value = proc_cpuinfo_clock(); + if (value) clock = value; + #endif ++#ifdef __FreeBSD__ ++ size_t len = sizeof(clock); ++ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0); ++#endif + #ifdef WINDOWS + char *clock_str = malloc(MAX_IDENT_SIZE); + /*!! untested !!*/ +@@ -356,6 +365,10 @@ CODE: + { + char *value = malloc(MAX_IDENT_SIZE); + int retcode = 0; ++#ifdef __FreeBSD__ ++ size_t len = MAX_IDENT_SIZE; ++ sysctlbyname("hw.model", value, &len, NULL, 0); ++#endif + #ifdef __linux__ + value = proc_cpuinfo_field ("model name"); + if (!value) value = proc_cpuinfo_field ("machine"); diff --git a/devel/ruby-rbprof/Makefile b/devel/ruby-rbprof/Makefile index 71a05e226265..222fb1e99cb5 100644 --- a/devel/ruby-rbprof/Makefile +++ b/devel/ruby-rbprof/Makefile @@ -1,33 +1,35 @@ # Created by: Sean Chittenden # $FreeBSD$ PORTNAME= rbprof PORTVERSION= 0.2.1 CATEGORIES= devel ruby MASTER_SITES= SF/aspectr/aspectr/0.3.5 DISTNAME= aspectr-0-3-5 DIST_SUBDIR= ruby MAINTAINER= sean@chittenden.org COMMENT= Flexible Ruby profiler OPTIONS_DEFINE= DOCS #RUN_DEPENDS= ${RUBY_SITELIBDIR}/runit/error.rb:devel/ruby-unit \ # ${RUBY_SITELIBDIR}/aspectr.rb:devel/ruby-aspectr +USES= dos2unix + USE_RUBY= yes NO_BUILD= yes do-install: @${MKDIR} ${STAGEDIR}${RUBY_SITELIBDIR}/rbprof @${MKDIR} ${STAGEDIR}${PORTDOCS}${RUBY_DOCDIR}/rbprof ${INSTALL_DATA} ${WRKSRC}/README \ ${WRKSRC}/TODO ${STAGEDIR}${PORTDOCS}${RUBY_DOCDIR}/rbprof/ ${RUBY} -p -i -e 'gsub(/\r\n/, "\n")' ${WRKSRC}/aspects/profiler/lib/rbprof.rb ${RUBY} -p -i -e 'gsub(/\r\n/, "\n")' ${WRKSRC}/aspects/profiler/lib/trap_method_definitions.rb ${INSTALL_DATA} ${WRKSRC}/aspects/profiler/lib/rbprof.rb ${STAGEDIR}${RUBY_SITELIBDIR}/ ${INSTALL_DATA} ${WRKSRC}/aspects/profiler/lib/trap_method_definitions.rb ${STAGEDIR}${RUBY_SITELIBDIR}/rbprof/ .include diff --git a/devel/ruby-rbprof/files/patch-aspects__profiler__lib__rbprof.rb b/devel/ruby-rbprof/files/patch-aspects_profiler_lib_rbprof.rb similarity index 55% rename from devel/ruby-rbprof/files/patch-aspects__profiler__lib__rbprof.rb rename to devel/ruby-rbprof/files/patch-aspects_profiler_lib_rbprof.rb index d442ebdbc5cc..36d730ad24f5 100644 --- a/devel/ruby-rbprof/files/patch-aspects__profiler__lib__rbprof.rb +++ b/devel/ruby-rbprof/files/patch-aspects_profiler_lib_rbprof.rb @@ -1,9 +1,9 @@ ---- aspects/profiler/lib/rbprof.rb.orig Tue Jan 29 07:45:45 2002 -+++ aspects/profiler/lib/rbprof.rb Fri Oct 3 18:02:23 2003 +--- aspects/profiler/lib/rbprof.rb.orig 2016-06-20 14:57:12 UTC ++++ aspects/profiler/lib/rbprof.rb @@ -1,5 +1,5 @@ - require 'aspectr' --require 'trap_method_definitions' -+require 'rbprof/trap_method_definitions' - - class Profiler < AspectR::Aspect - def initialize + require 'aspectr' +-require 'trap_method_definitions' ++require 'rbprof/trap_method_definitions' + + class Profiler < AspectR::Aspect + def initialize diff --git a/devel/sabre/Makefile b/devel/sabre/Makefile index 019a9b3b2004..c1aaa8527c2b 100644 --- a/devel/sabre/Makefile +++ b/devel/sabre/Makefile @@ -1,29 +1,30 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= sabre PORTVERSION= 20100501 CATEGORIES= devel multimedia java MASTER_SITES= SF/sabre-library DISTNAME= ${PORTNAME}-src-${PORTVERSION} MAINTAINER= ale@FreeBSD.org COMMENT= Simple API for Binary REpresentations and an UDF Library LICENSE= LGPL21 WRKSRC= ${WRKDIR}/Simple\ API\ for\ Binary\ REpresentations\ \(SABRE\) -USES= zip +USES= dos2unix zip +DOS2UNIX_GLOB= *.xml *.java USE_JAVA= yes JAVA_VERSION= 1.6+ USE_ANT= yes ALL_TARGET= dist -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar %%JAVAJARDIR%%/udflib.jar +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar ${JAVAJARDIR}/udflib.jar do-install: @${MKDIR} ${STAGEDIR}${JAVAJARDIR} ${INSTALL_DATA} ${WRKSRC}/dist/${PORTNAME}.jar \ ${WRKSRC}/dist/udflib.jar ${STAGEDIR}${JAVAJARDIR}/ .include diff --git a/devel/sabre/files/patch-build.xml b/devel/sabre/files/patch-build.xml index 6ac833349162..43466bae1c51 100644 --- a/devel/sabre/files/patch-build.xml +++ b/devel/sabre/files/patch-build.xml @@ -1,18 +1,11 @@ ---- build.xml.orig 2012-01-10 16:24:58.000000000 +0100 -+++ build.xml 2012-01-10 16:25:09.000000000 +0100 +--- build.xml.orig 2016-06-20 14:54:06 UTC ++++ build.xml @@ -32,7 +32,7 @@ - - - -- -+ - - - -@@ -77,4 +77,4 @@ - - - -- -\ No newline at end of file -+ + + + +- ++ + + + diff --git a/devel/sabre/files/patch-src_java_de_tu_darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java b/devel/sabre/files/patch-src_java_de_tu__darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java similarity index 72% rename from devel/sabre/files/patch-src_java_de_tu_darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java rename to devel/sabre/files/patch-src_java_de_tu__darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java index cef9ccd6a3f0..d263ee58ffe6 100644 --- a/devel/sabre/files/patch-src_java_de_tu_darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java +++ b/devel/sabre/files/patch-src_java_de_tu__darmstadt_informatik_rbg_bstickler_udflib_UDFImageBuilderFile.java @@ -1,17 +1,17 @@ ---- src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java.orig 2010-06-28 11:44:55.000000000 +0200 -+++ src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java 2010-06-28 11:46:18.000000000 +0200 -@@ -32,6 +32,14 @@ - // Symlink // TODO: maybe support symlinks - } - -+ public UDFImageBuilderFile( String fileIdentifier, File sourceFile ) -+ throws Exception -+ { -+ this(sourceFile); -+ -+ identifier = fileIdentifier; -+ } -+ - public UDFImageBuilderFile( File sourceFile ) - throws Exception - { +--- src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java.orig 2016-06-20 14:54:06 UTC ++++ src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java +@@ -32,6 +32,14 @@ public class UDFImageBuilderFile impleme + // Symlink // TODO: maybe support symlinks + } + ++ public UDFImageBuilderFile( String fileIdentifier, File sourceFile ) ++ throws Exception ++ { ++ this(sourceFile); ++ ++ identifier = fileIdentifier; ++ } ++ + public UDFImageBuilderFile( File sourceFile ) + throws Exception + { diff --git a/devel/sdts++/Makefile b/devel/sdts++/Makefile index a1787dd2bd19..9fe59c30769a 100644 --- a/devel/sdts++/Makefile +++ b/devel/sdts++/Makefile @@ -1,30 +1,30 @@ # Created by: erik@habatech.no # $FreeBSD$ PORTNAME= sdts++ PORTVERSION= 1.5.1 PORTREVISION= 6 CATEGORIES= devel MASTER_SITES= http://thor-f5.er.usgs.gov/sdts/sdtsxx/ \ http://lychnobite.org/sdts/ MAINTAINER= ports@FreeBSD.org COMMENT= C++ library for SDTS related development LIB_DEPENDS= libboost_thread.so:devel/boost-libs -DOS2UNIX_FILES= sdts++/io/sio_Utils.cpp +DOS2UNIX_GLOB= *.cpp USES= autoreconf bison dos2unix gmake libtool makeinfo GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-boost=${LOCALBASE}/include INSTALL_TARGET= install-strip USE_LDCONFIG= yes INFO= sdts++ post-patch: .for f in AUTHORS ChangeLog NEWS README @${TOUCH} ${WRKSRC}/sysutils/${f} .endfor .include diff --git a/devel/sdts++/files/patch-doc__sdts++.texi b/devel/sdts++/files/patch-doc__sdts++.texi index 102b48bfecb1..2cdd3f1ad769 100644 --- a/devel/sdts++/files/patch-doc__sdts++.texi +++ b/devel/sdts++/files/patch-doc__sdts++.texi @@ -1,59 +1,59 @@ ---- doc/sdts++.texi.orig Wed Jan 12 00:48:47 2000 -+++ doc/sdts++.texi Fri Jul 28 09:12:44 2000 +--- doc/sdts++.texi.orig 2003-06-10 18:15:51 UTC ++++ doc/sdts++.texi @@ -7,6 +7,10 @@ @setfilename sdts++.info @settitle @code{sdts++} Library @setchapternewpage odd +@dircategory C++ toolkit for reading and writing SDTS datasets +@direntry +* stds++: (sdts++). C++ toolkit for reading and writing SDTS datasets +@end direntry @c Put functions in the concept index @syncodeindex fn cp @@ -35,8 +39,8 @@ % be automatically generated, just to keep things simple. % This is rather kludgy, actually: argument #1 is the colon from the RCS % string. It's only there so that RCS/CVS won't expand the wrong thing. -@xdef@seteditionone$Revision#1 #2 ${#2} -@xdef@edition{@seteditionone$Revision: 1.21 $} +\xdef\seteditionone$Revision#1 #2 ${#2} +\xdef\edition{\seteditionone$Revision: 1.21 $} @end tex @c %** End of header @@ -57,11 +61,11 @@ are preserved on all copies. @iftex @subtitle Edition @edition @end iftex -@author Mark Coletti +@author Mark Coletti @page @vskip 0pt plus 1filll -Copyright @copyright 2003 United States Geological Survey. +Copyright @copyright{} 2003 United States Geological Survey. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1169,12 +1173,14 @@ sio_8211FieldFormat declares the followi This class contains specific subfield formatting information. This class defines the following enumerators: - -@code{ - typedef enum @{ A, I, R, S, C, B, X @} type; - - typedef enum @{ fixed, variable @} format; -} + +@ftable @code + +@item typedef enum @{ A, I, R, S, C, B, X @} type; + +@item typedef enum @{ fixed, variable @} format; + +@end ftable This class declares the following members: diff --git a/devel/sdts++/files/patch-sdts++__io__sio_8211Converter.cpp b/devel/sdts++/files/patch-sdts++__io__sio_8211Converter.cpp deleted file mode 100644 index 01e85d38a263..000000000000 --- a/devel/sdts++/files/patch-sdts++__io__sio_8211Converter.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- sdts++/io/sio_8211Converter.cpp.orig 2002-11-25 07:07:43.000000000 +0900 -+++ sdts++/io/sio_8211Converter.cpp 2012-09-12 16:47:10.000000000 +0900 -@@ -16,6 +16,7 @@ - - #include - #include -+#include - - #include - diff --git a/devel/sdts++/files/patch-sdts++__io__sio_8211DDRField.cpp b/devel/sdts++/files/patch-sdts++__io__sio_8211DDRField.cpp deleted file mode 100644 index 32988f5a9b40..000000000000 --- a/devel/sdts++/files/patch-sdts++__io__sio_8211DDRField.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- sdts++/io/sio_8211DDRField.cpp.orig 2002-11-25 07:07:43.000000000 +0900 -+++ sdts++/io/sio_8211DDRField.cpp 2012-09-12 16:48:13.000000000 +0900 -@@ -18,6 +18,7 @@ - #endif - - #include -+#include - - - diff --git a/devel/sdts++/files/patch-sdts++__io__sio_Utils.cpp b/devel/sdts++/files/patch-sdts++__io__sio_Utils.cpp deleted file mode 100644 index a2622c1e8202..000000000000 --- a/devel/sdts++/files/patch-sdts++__io__sio_Utils.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- sdts++/io/sio_Utils.cpp.orig 2002-10-08 05:44:24.000000000 +0900 -+++ sdts++/io/sio_Utils.cpp 2012-09-12 16:50:32.000000000 +0900 -@@ -15,6 +15,7 @@ - #endif - - #include -+#include - - - diff --git a/devel/sdts++/files/patch-sdts++__builder__sb_Accessor.cpp b/devel/sdts++/files/patch-sdts++_builder_sb__Accessor.cpp similarity index 68% rename from devel/sdts++/files/patch-sdts++__builder__sb_Accessor.cpp rename to devel/sdts++/files/patch-sdts++_builder_sb__Accessor.cpp index 6af1acd323e8..4806a832767b 100644 --- a/devel/sdts++/files/patch-sdts++__builder__sb_Accessor.cpp +++ b/devel/sdts++/files/patch-sdts++_builder_sb__Accessor.cpp @@ -1,65 +1,59 @@ ---- sdts++/builder/sb_Accessor.cpp.orig 2003-06-11 00:51:40.000000000 +0400 -+++ sdts++/builder/sb_Accessor.cpp 2012-03-11 20:18:18.000000000 +0300 +--- sdts++/builder/sb_Accessor.cpp.orig 2016-06-20 14:59:02 UTC ++++ sdts++/builder/sb_Accessor.cpp @@ -26,6 +26,13 @@ - #include - #include - + #include + #include + +#ifdef __FreeBSD__ +# include +# if __FreeBSD_version < 500035 +# include +# endif +#endif -+namespace std { using ::mbstate_t; } - #include - #include - #include -@@ -155,27 +162,27 @@ - - - --static const char* module_mnemonics_[] = --{ -- {"CATS"}, -- {"CATD"}, -- {"DDOM"}, -- {"DDSH"}, -- {"MDOM"}, -- {"MDEF"}, -- {"DQHL"}, -- {"DQPA"}, -- {"DQAA"}, -- {"DQLC"}, -- {"DQCG"}, -- {"IDEN"}, -- {"IREF"}, -- {"LDEF"}, -- {"RSDF"}, -- {"STAT"}, -- {"XREF"}, -- {""} --}; // module_mnemonics -+static const char* module_mnemonics_[] = -+{ ++namespace std { using ::mbstate_t; } + #include + #include + #include +@@ -157,24 +164,24 @@ sb_Accessor::~sb_Accessor( ) + + static const char* module_mnemonics_[] = + { +- {"CATS"}, +- {"CATD"}, +- {"DDOM"}, +- {"DDSH"}, +- {"MDOM"}, +- {"MDEF"}, +- {"DQHL"}, +- {"DQPA"}, +- {"DQAA"}, +- {"DQLC"}, +- {"DQCG"}, +- {"IDEN"}, +- {"IREF"}, +- {"LDEF"}, +- {"RSDF"}, +- {"STAT"}, +- {"XREF"}, +- {""} + "CATS", + "CATD", + "DDOM", + "DDSH", + "MDOM", + "MDEF", + "DQHL", + "DQPA", + "DQAA", + "DQLC", + "DQCG", + "IDEN", + "IREF", + "LDEF", + "RSDF", + "STAT", + "XREF", + "" -+}; // module_mnemonics - - - + }; // module_mnemonics + + diff --git a/devel/sdts++/files/patch-sdts++__io__FormatParset.yy b/devel/sdts++/files/patch-sdts++_io_FormatParser.yy similarity index 56% rename from devel/sdts++/files/patch-sdts++__io__FormatParset.yy rename to devel/sdts++/files/patch-sdts++_io_FormatParser.yy index ea268ef8a1ff..edada988d815 100644 --- a/devel/sdts++/files/patch-sdts++__io__FormatParset.yy +++ b/devel/sdts++/files/patch-sdts++_io_FormatParser.yy @@ -1,13 +1,13 @@ ---- sdts++/io/FormatParser.yy.orig 2002-10-08 05:44:24.000000000 +0900 -+++ sdts++/io/FormatParser.yy 2012-09-12 16:53:19.000000000 +0900 +--- sdts++/io/FormatParser.yy.orig 2002-10-07 20:44:24 UTC ++++ sdts++/io/FormatParser.yy @@ -71,6 +71,10 @@ #include +#include + +#include + #ifndef INCLUDED_SIO8211FIELDFORMAT_H #include "sdts++/io/sio_8211FieldFormat.h" #endif diff --git a/devel/sdts++/files/patch-sdts++_io_sio__8211Converter.cpp b/devel/sdts++/files/patch-sdts++_io_sio__8211Converter.cpp new file mode 100644 index 000000000000..8d6b7cc476b2 --- /dev/null +++ b/devel/sdts++/files/patch-sdts++_io_sio__8211Converter.cpp @@ -0,0 +1,10 @@ +--- sdts++/io/sio_8211Converter.cpp.orig 2016-06-20 14:59:02 UTC ++++ sdts++/io/sio_8211Converter.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + #include + diff --git a/devel/sdts++/files/patch-sdts++_io_sio__8211DDRField.cpp b/devel/sdts++/files/patch-sdts++_io_sio__8211DDRField.cpp new file mode 100644 index 000000000000..3e8412d076c9 --- /dev/null +++ b/devel/sdts++/files/patch-sdts++_io_sio__8211DDRField.cpp @@ -0,0 +1,10 @@ +--- sdts++/io/sio_8211DDRField.cpp.orig 2016-06-20 14:59:02 UTC ++++ sdts++/io/sio_8211DDRField.cpp +@@ -18,6 +18,7 @@ + #endif + + #include ++#include + + + diff --git a/devel/sdts++/files/patch-sdts++_io_sio__Utils.cpp b/devel/sdts++/files/patch-sdts++_io_sio__Utils.cpp new file mode 100644 index 000000000000..e3b5baae197e --- /dev/null +++ b/devel/sdts++/files/patch-sdts++_io_sio__Utils.cpp @@ -0,0 +1,10 @@ +--- sdts++/io/sio_Utils.cpp.orig 2016-06-20 14:59:02 UTC ++++ sdts++/io/sio_Utils.cpp +@@ -15,6 +15,7 @@ + #endif + + #include ++#include + + + diff --git a/devel/sdts++/files/patch-sysutils__t_basename.cpp b/devel/sdts++/files/patch-sysutils__t_basename.cpp deleted file mode 100644 index 71aef16be9be..000000000000 --- a/devel/sdts++/files/patch-sysutils__t_basename.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- sysutils/t_basename.cpp.orig 2002-11-27 09:21:34.000000000 +0900 -+++ sysutils/t_basename.cpp 2012-09-12 16:55:05.000000000 +0900 -@@ -3,6 +3,7 @@ - // - - #include -+#include - - #include "fileutils.h" - diff --git a/devel/sdts++/files/patch-sysutils__t_dirname.cpp b/devel/sdts++/files/patch-sysutils__t_dirname.cpp deleted file mode 100644 index 0616cfbe6daa..000000000000 --- a/devel/sdts++/files/patch-sysutils__t_dirname.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- sysutils/t_dirname.cpp.orig 2002-11-27 09:21:34.000000000 +0900 -+++ sysutils/t_dirname.cpp 2012-09-12 16:54:58.000000000 +0900 -@@ -3,6 +3,7 @@ - // - - #include -+#include - - #include "fileutils.h" - diff --git a/devel/sdts++/files/patch-sysutils__t_stringutils.cpp b/devel/sdts++/files/patch-sysutils__t_stringutils.cpp deleted file mode 100644 index d6c102534b89..000000000000 --- a/devel/sdts++/files/patch-sysutils__t_stringutils.cpp +++ /dev/null @@ -1,9 +0,0 @@ ---- sysutils/t_stringutils.cpp.orig 2001-07-18 05:50:15.000000000 +0900 -+++ sysutils/t_stringutils.cpp 2012-09-12 16:44:29.000000000 +0900 -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - - using namespace std; diff --git a/devel/sdts++/files/patch-sysutils_t__basename.cpp b/devel/sdts++/files/patch-sysutils_t__basename.cpp new file mode 100644 index 000000000000..a2842ead2aa3 --- /dev/null +++ b/devel/sdts++/files/patch-sysutils_t__basename.cpp @@ -0,0 +1,10 @@ +--- sysutils/t_basename.cpp.orig 2016-06-20 14:59:02 UTC ++++ sysutils/t_basename.cpp +@@ -3,6 +3,7 @@ + // + + #include ++#include + + #include "fileutils.h" + diff --git a/devel/sdts++/files/patch-sysutils_t__dirname.cpp b/devel/sdts++/files/patch-sysutils_t__dirname.cpp new file mode 100644 index 000000000000..9f7a7eb14c78 --- /dev/null +++ b/devel/sdts++/files/patch-sysutils_t__dirname.cpp @@ -0,0 +1,10 @@ +--- sysutils/t_dirname.cpp.orig 2016-06-20 14:59:02 UTC ++++ sysutils/t_dirname.cpp +@@ -3,6 +3,7 @@ + // + + #include ++#include + + #include "fileutils.h" + diff --git a/devel/sdts++/files/patch-sysutils_t__stringutils.cpp b/devel/sdts++/files/patch-sysutils_t__stringutils.cpp new file mode 100644 index 000000000000..5c5281598e62 --- /dev/null +++ b/devel/sdts++/files/patch-sysutils_t__stringutils.cpp @@ -0,0 +1,10 @@ +--- sysutils/t_stringutils.cpp.orig 2016-06-20 14:59:02 UTC ++++ sysutils/t_stringutils.cpp +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + using namespace std; + diff --git a/emulators/pcemu/Makefile b/emulators/pcemu/Makefile index a16b9744e54e..00512d0143f0 100644 --- a/emulators/pcemu/Makefile +++ b/emulators/pcemu/Makefile @@ -1,22 +1,24 @@ # Created by: joerg # $FreeBSD$ PORTNAME= pcemu PORTVERSION= 1.01b PORTREVISION= 4 CATEGORIES= emulators MASTER_SITES= LOCAL/joerg DISTNAME= pcemu1.01alpha MAINTAINER= joerg@FreeBSD.org COMMENT= 8086 PC emulator, by David Hedley BUILD_DEPENDS= bdftopcf:x11-fonts/bdftopcf RUN_DEPENDS= mkfontdir:x11-fonts/mkfontdir \ mkfontscale:x11-fonts/mkfontscale USE_XORG= x11 xext +USES= dos2unix +DOS2UNIX_FILES= programs/config.sys MAKE_ENV= FILESDIR=${FILESDIR} STAGEDIR=${STAGEDIR} MAKE_ARGS= CC="${CC}" .include diff --git a/emulators/pcemu/files/patch-ae b/emulators/pcemu/files/patch-ae index 6ff371a2fc8c..5c745ccbbe82 100644 --- a/emulators/pcemu/files/patch-ae +++ b/emulators/pcemu/files/patch-ae @@ -1,10 +1,7 @@ -*** programs/config.sys.orig Mon Mar 27 21:27:23 1995 ---- programs/config.sys Mon Mar 27 22:19:26 1995 -*************** -*** 1,2 **** -! device=emufs.sys / -! stacks 9,512 ---- 1,3 ---- -! device=\emufs.sys /usr/local/lib/pcemu/C -! stacks 9,512 -! +--- programs/config.sys.orig 2016-06-20 15:48:12 UTC ++++ programs/config.sys +@@ -1,2 +1,3 @@ +-device=emufs.sys / ++device=\emufs.sys /usr/local/lib/pcemu/C + stacks 9,512 ++ diff --git a/emulators/yabause/Makefile b/emulators/yabause/Makefile index 6d71b51b54cd..7c5eb8b866a2 100644 --- a/emulators/yabause/Makefile +++ b/emulators/yabause/Makefile @@ -1,51 +1,51 @@ # Created by: Jose Alonso Cardenas Marquez # $FreeBSD$ PORTNAME= yabause PORTVERSION= 0.9.14 CATEGORIES= emulators MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Sega Saturn system emulator LICENSE= GPLv2+ USES= cmake dos2unix openal:soft pkgconfig -DOS2UNIX_FILES= src/qt/YabauseThread.cpp +DOS2UNIX_FILES= src/qt/YabauseThread.cpp src/core.h USE_XORG= xmu xrandr USE_GL= gl glu glut CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib SUB_FILES= pkg-message OPTIONS_DEFINE= SDL2 OPTIONS_SINGLE= GUI OPTIONS_SINGLE_GUI= GTK2 QT4 QT5 OPTIONS_DEFAULT= QT4 GTK2_LIB_DEPENDS= libgtkglext-x11-1.0.so:x11-toolkits/gtkglext GTK2_USE= gnome=gtk20 GTK2_CMAKE_ON= -DYAB_PORTS:STRING=gtk GTK2_CMAKE_OFF= -DYAB_PORTS:STRING=qt QT4_USE= qt4=corelib,gui,opengl \ qt4=moc_build,qmake_build,rcc_build,uic_build QT4_CMAKE_ON= -DQt5_FOUND:BOOL=OFF QT5_USE= qt5=core,gui,opengl \ qt5=buildtools_build,qmake_build SDL2_DESC= SDL2 libraries support SDL2_USE= sdl=sdl2 SDL2_USE_OFF= sdl=sdl .include post-patch: .if empty(PORT_OPTIONS:MSDL2) @${REINPLACE_CMD} -e \ 's|SDL2 |SDL | ; \ s|SDL2_|SDL_|' ${WRKSRC}/src/CMakeLists.txt .endif .include diff --git a/emulators/yabause/files/patch-src__core.h b/emulators/yabause/files/patch-src__core.h index 30820f6aa7f6..fd63e919d7ca 100644 --- a/emulators/yabause/files/patch-src__core.h +++ b/emulators/yabause/files/patch-src__core.h @@ -1,13 +1,13 @@ --- src/core.h.orig +++ src/core.h @@ -252,8 +252,10 @@ # define BSWAP16(x) ((__builtin_bswap16((x) >> 16) << 16) | __builtin_bswap16((x))) # define BSWAP16L(x) (__builtin_bswap16((x))) #endif +#ifdef HAVE_BUILTIN_BSWAP32 # define BSWAP32(x) (__builtin_bswap32((x))) #endif +#endif - #ifdef _MSC_VER + #ifdef _MSC_VER # define BSWAP16(x) ((_byteswap_ushort((x) >> 16) << 16) | _byteswap_ushort((x))) diff --git a/games/eights/Makefile b/games/eights/Makefile index 2946a768c601..79eb82d31858 100644 --- a/games/eights/Makefile +++ b/games/eights/Makefile @@ -1,22 +1,24 @@ # Created by: Bob Bomar # $FreeBSD$ PORTNAME= eights PORTVERSION= 1.0 CATEGORIES= games MASTER_SITES= http://dxkelly.freeshell.org/ DISTNAME= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Text based card game, the objective is to get rid of all your cards +USES= dos2unix +DOS2UNIX_FILES= eights.c NO_WRKSUBDIR= yes PLIST_FILES= bin/eights do-build: @cd ${WRKSRC} && ${CC} ${CFLAGS} ${PORTNAME}.c -o ${PORTNAME} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin .include diff --git a/games/eights/files/patch-eights.c b/games/eights/files/patch-eights.c index 51aac5ea1aa7..2155d1e59ac4 100644 --- a/games/eights/files/patch-eights.c +++ b/games/eights/files/patch-eights.c @@ -1,11 +1,11 @@ ---- eights.c Sun Nov 10 08:50:52 2002 -+++ eights.c Sat May 20 12:36:22 2000 +--- eights.c.orig 2016-06-20 14:33:50 UTC ++++ eights.c @@ -5,6 +5,8 @@ - #include - #include - -+#define debug -+ - #ifdef DEBUG - #undef debug - #define debug printf + #include + #include + ++#define debug ++ + #ifdef DEBUG + #undef debug + #define debug printf diff --git a/games/heretic/Makefile b/games/heretic/Makefile index 92daad98c877..036b78a0f2d5 100644 --- a/games/heretic/Makefile +++ b/games/heretic/Makefile @@ -1,76 +1,77 @@ # Created by: Will Andrews # $FreeBSD$ PORTNAME= heretic PORTVERSION= 1.2 PORTREVISION= 8 CATEGORIES= games MASTER_SITES= http://files.kyle-evans.net/freebsd/:source \ http://files.kyle-evans.net/freebsd/:wad DISTNAME= gl${PORTNAME}-${PORTVERSION} MAINTAINER= oliver@FreeBSD.org COMMENT= Unix source-port of the famous Heretic game by id Software -USES= gmake +USES= dos2unix gmake +DOS2UNIX_FILES= opengl/gl_struct.h USE_XORG= x11 xi xpm xau OPTIONS_DEFINE= WAD DOCS OPTIONS_SINGLE= SG1 OPTIONS_SINGLE_SG1= X11 FASTX11 SDL FASTX11_DESC= Use FastX11 WAD_DESC= With shareware WAD SG1_DESC= Graphics Selections OPTIONS_DEFAULT= X11 WAD .include .if ${PORT_OPTIONS:MX11} ALL_TARGET= x11 BINARY= xheretic .endif .if ${PORT_OPTIONS:MFASTX11} ALL_TARGET= fastx11 BINARY= xaheretic .endif .if ${PORT_OPTIONS:MSDL} USE_SDL= yes ALL_TARGET= sdl BINARY= sdlheretic CFLAGS+= `${SDL_CONFIG} --cflags` .endif .if ${PORT_OPTIONS:MWAD} DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source heretic_share.wad.gz:wad EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} PLIST_SUB+= WAD="" .else PLIST_SUB+= WAD="@comment " .endif post-extract: .if ${PORT_OPTIONS:MWAD} @${GZIP_CMD} -dc ${_DISTDIR}/heretic_share.wad.gz \ > ${WRKSRC}/heretic_share.wad .endif @${FIND} ${WRKSRC} -name .depend -type f -delete @${RM} ${WRKSRC}/i_ipx.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/heretic ${INSTALL_PROGRAM} ${WRKSRC}/sndserver ${STAGEDIR}${PREFIX}/bin/sndserver .if ${PORT_OPTIONS:MWAD} @${MKDIR} ${STAGEDIR}${PREFIX}/share/heretic ${INSTALL_DATA} ${WRKSRC}/heretic_share.wad ${STAGEDIR}${PREFIX}/share/heretic .endif .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in "End User License Heretic Source Code.txt" Gamekeys.txt README.txt AUTHORS SourceReadme.txt Changelog README.opengl ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR} .endfor .endif .include diff --git a/games/heretic/files/patch-Makefile b/games/heretic/files/patch-Makefile index a7deddb7ff94..bc3f8bb4295a 100644 --- a/games/heretic/files/patch-Makefile +++ b/games/heretic/files/patch-Makefile @@ -1,91 +1,91 @@ ---- Makefile.orig Mon May 1 22:56:45 2000 -+++ Makefile Fri Aug 30 01:43:32 2002 +--- Makefile.orig 2000-05-02 01:57:07 UTC ++++ Makefile @@ -1,19 +1,19 @@ # Makefile for Linux Heretic/GLHeretic # Comment the line below if you don't want to build GLHeretic. -WANT_OGL = yes +#WANT_OGL = yes # Comment this if you don't want to build GLHeretic # with highest quality options. # (Only if you have WANT_OGL !) -WANT_NICE_OGL = yes +#WANT_NICE_OGL = yes # Uncomment the line below if you want to use GSI for sound. # (doesn't really work yet. :-() #WANT_GSI = yes -CC = gcc -pipe +#CC = gcc -pipe # # For old SVGALIB, comment out -D__NEWVGALIB__ -@@ -21,7 +21,7 @@ +@@ -21,7 +21,7 @@ CC = gcc -pipe CDEFS.ipx = -DUNIX -DHAVE_USLEEP -DHAVE_MATH_H -DHAVE_VALUES_H -DLINUX_MOUSE \ -DIPX_PROTOCOL -DI_GGI_HERETIC -DNEED_SHMGETEVENTBASE \ -D__NEWVGALIB__ # -DIPX_DEBUG -DEXTRA_WADS -CDEFS.udp = -DUNIX -DHAVE_USLEEP -DHAVE_MATH_H -DHAVE_VALUES_H -DLINUX_MOUSE \ +CDEFS.udp = -DUNIX -DHAVE_USLEEP -DHAVE_MATH_H -DLINUX_MOUSE \ -DUDP_PROTOCOL -DI_GGI_HERETIC -DNEED_SHMGETEVENTBASE \ -D__NEWVGALIB__ # -DEXTRA_WADS -@@ -38,7 +38,7 @@ +@@ -38,7 +38,7 @@ COPT.m68k = -m68020-60 -O2 -fomit-frame- COPT.alpha = -O2 -D__64BIT__ -DHAVE_ALLOCA_H -COPT.FreeBSD = -m486 -O2 -malign-jumps=2 -malign-functions=2 -D__32BIT__ +COPT.FreeBSD = -D__32BIT__ -DHOMEDIR='"\"${PREFIX}/share/heretic\""' COPT.arm = -O2 -D__32BIT__ -fsigned-char -fomit-frame-pointer \ -DHAVE_ALLOCA_H -D__PACKED__=__attribute__\ \(\(packed\)\) -@@ -57,12 +57,12 @@ +@@ -57,12 +57,12 @@ endif endif # Change this to change the platform -COPT.arch = $(COPT.x86) +COPT.arch = $(COPT.FreeBSD) # If you want IPX-netcode compiled, replace $(CDEFS.udp) with $(CDEFS.ipx) -CFLAGS = -Wall $(CDEFS.udp) $(COPT.arch) \ - -I. -I.. -I/usr/X11R6/include $(COPT.sound) $(COPT.opengl) +CFLAGS += $(CDEFS.udp) $(COPT.arch) \ + -I. -I.. -I${LOCALBASE}/include -I${LOCALBASE}/include $(COPT.sound) $(COPT.opengl) # Uncomment the line below if you want to use original "[" and "]" keys # for inventory access, instead of "k" and "l". -@@ -85,18 +85,18 @@ +@@ -85,18 +85,18 @@ SOUND_REFS = soundclient/i_sound.c sound COPT.sound = -D__DOSOUND__ -DSNDSERV -Isoundclient -D__DOMUSIC__ -DMUSSERV # -D_DEBUGSOUND X11LIBS = -lXext -lX11 -MUSSERV = musserver +#MUSSERV = musserver SNDSERV = sndserver endif -X_LDFLAGS = -L/usr/X11R6/lib +X_LDFLAGS = -L${LOCALBASE}/lib X11LIBS = -lXext -lX11 -GLLIBS = -lSDL -lpthread +GLLIBS = `${SDL_CONFIG} --libs` -lpthread GGILIBS = -lggi -lm VGALIBS = -lvga -SDLLIBS = -lSDL -lpthread +SDLLIBS = `${SDL_CONFIG} --libs` -lpthread OBJS = am_map.o ct_chat.o d_main.o d_net.o f_finale.o g_game.o \ p_ceilng.o p_doors.o p_enemy.o p_floor.o p_inter.o p_lights.o \ -@@ -104,7 +104,7 @@ +@@ -104,7 +104,7 @@ OBJS = am_map.o ct_chat.o d_main.o d_net p_spec.o p_switch.o p_telept.o p_tick.o p_user.o r_bsp.o r_data.o \ r_draw.o r_plane.o r_segs.o r_things.o r_main.o mn_menu.o sb_bar.o \ tables.o v_video.o w_wad.o z_zone.o in_lude.o \ - info.o i_net.o i_system.o i_udp.o i_ipx.o i_main.o $(SOUND_OBJS) + info.o i_net.o i_system.o i_udp.o i_main.o $(SOUND_OBJS) GLOBJS = opengl/gl_effects.o opengl/gl_floorceil.o opengl/gl_fonts.o \ opengl/gl_func.o opengl/gl_init.o opengl/gl_lights.o \ diff --git a/games/heretic/files/patch-d_main.c b/games/heretic/files/patch-d__main.c similarity index 79% rename from games/heretic/files/patch-d_main.c rename to games/heretic/files/patch-d__main.c index 298ac1c3d75d..54687d3ac295 100644 --- a/games/heretic/files/patch-d_main.c +++ b/games/heretic/files/patch-d__main.c @@ -1,25 +1,25 @@ ---- d_main.c.ori Sun Mar 11 16:31:49 2007 -+++ d_main.c Sun Mar 11 16:33:46 2007 -@@ -690,6 +690,7 @@ +--- d_main.c.orig 2003-12-08 23:21:25 UTC ++++ d_main.c +@@ -690,6 +690,7 @@ void D_DoomMain(void) setbuf(stdout, NULL); nomonsters = M_CheckParm("-nomonsters"); respawnparm = M_CheckParm("-respawn"); + respawnartifacts = M_CheckParm("-respawnartifacts"); ravpic = M_CheckParm("-ravpic"); noartiskip = M_CheckParm("-noartiskip"); debugmode = M_CheckParm("-debug"); -@@ -778,7 +779,13 @@ +@@ -778,7 +779,13 @@ void D_DoomMain(void) { deathmatch = true; } - + + if ( M_CheckParm("-respawnartifacts")!=0 ) + { + printf("Parameter: -respawnartifacts\n"); + respawnartifacts=1; + } + p = M_CheckParm("-skill"); if(p && p < myargc-1) { diff --git a/games/heretic/files/patch-doc-Gamekeys.txt b/games/heretic/files/patch-doc_Gamekeys.txt similarity index 65% rename from games/heretic/files/patch-doc-Gamekeys.txt rename to games/heretic/files/patch-doc_Gamekeys.txt index d32c5471e67c..ff4dced18c48 100644 --- a/games/heretic/files/patch-doc-Gamekeys.txt +++ b/games/heretic/files/patch-doc_Gamekeys.txt @@ -1,13 +1,13 @@ ---- doc/Gamekeys.txt.orig 1999-04-06 14:58:18.000000000 +0200 -+++ doc/Gamekeys.txt 2011-04-21 01:30:38.000000000 +0200 -@@ -9,6 +9,10 @@ +--- doc/Gamekeys.txt.orig 1999-04-06 12:58:18 UTC ++++ doc/Gamekeys.txt +@@ -9,6 +9,10 @@ key-strafe-right: '.' key_fire: Control-key key_use: Space-key +key_health: 'a' +key_tomeofpower: Backspace-key +key_egg: 'q' +key_firebomb: 'b' key_strafe: Alt/Meta-key key_speed: Shift-key diff --git a/games/heretic/files/patch-doc-README.opengl b/games/heretic/files/patch-doc_README.opengl similarity index 77% rename from games/heretic/files/patch-doc-README.opengl rename to games/heretic/files/patch-doc_README.opengl index f8ec2e3472c6..ff8448518123 100644 --- a/games/heretic/files/patch-doc-README.opengl +++ b/games/heretic/files/patch-doc_README.opengl @@ -1,12 +1,12 @@ ---- doc/README.opengl.orig 2000-05-15 22:46:24.000000000 +0200 -+++ doc/README.opengl 2011-04-21 01:36:33.000000000 +0200 -@@ -71,6 +71,9 @@ +--- doc/README.opengl.orig 2000-05-15 20:46:24 UTC ++++ doc/README.opengl +@@ -71,6 +71,9 @@ To start the game in windowed mode, use 7. -mlook With this switch you enable free mouse look in the game. Normaly it makes sense to use this switch together with the -grabmouse switch. Mouselook is enabled by default, but it can be switched inside the game. +8. -respawnartifacts +With this switch you enable respawning of artifacts even in version 1.3 as it +was in version 1.0 of heretic. -You can also edit the generated glheretic.cfg file in the $HOME/.heretic directory after you have started the game once. diff --git a/games/heretic/files/patch-doomdef.h b/games/heretic/files/patch-doomdef.h index 7a6d1685e5f9..143b72dee090 100644 --- a/games/heretic/files/patch-doomdef.h +++ b/games/heretic/files/patch-doomdef.h @@ -1,19 +1,19 @@ ---- doomdef.h.ori Sun Mar 4 15:43:44 2007 -+++ doomdef.h Sun Mar 4 15:57:04 2007 -@@ -681,6 +681,7 @@ +--- doomdef.h.orig 2000-05-01 23:42:01 UTC ++++ doomdef.h +@@ -681,6 +681,7 @@ typedef struct short ticdup __PACKED__ ; /* 1 = no duplication, 2-5 = dup for slow nets */ short extratics __PACKED__ ; /* 1 = send a backup tic in every packet */ short deathmatch __PACKED__ ; /* 1 = deathmatch */ + short respawnartifacts __PACKED__ ; /* respawn the artifacts? 1=yes */ short savegame __PACKED__ ; /* -1 = new game, 0-5 = load savegame */ short episode __PACKED__ ; /* 1-3 */ short map __PACKED__ ; /* 1-9 */ -@@ -753,6 +754,8 @@ - extern boolean cdrom; /* true if cd-rom mode active ("-cdrom") */ +@@ -754,6 +755,8 @@ extern boolean cdrom; /* true if c extern boolean deathmatch; /* only if started as net death */ -+ -+extern boolean respawnartifacts; /* respawn the artifacts */ ++extern boolean respawnartifacts; /* respawn the artifacts */ ++ extern boolean netgame; /* only true if >1 player */ + extern boolean playeringame[MAXPLAYERS]; diff --git a/games/heretic/files/patch-doomtype.h b/games/heretic/files/patch-doomtype.h index f2eca026e66b..7ab841449a55 100644 --- a/games/heretic/files/patch-doomtype.h +++ b/games/heretic/files/patch-doomtype.h @@ -1,13 +1,13 @@ ---- doomtype.h.orig Wed Oct 5 07:40:18 2005 -+++ doomtype.h Wed Oct 5 07:40:41 2005 -@@ -59,9 +59,7 @@ +--- doomtype.h.orig 2000-01-07 20:42:41 UTC ++++ doomtype.h +@@ -59,9 +59,7 @@ typedef unsigned char byte; #define MININT ((int)0x80000000) #define MINLONG ((long)0x8000000000000000) -#endif /* 64bit */ - -#if defined(__32BIT__) +#elif defined(__32BIT__) /* 32bit defines */ diff --git a/games/heretic/files/patch-g_game.c b/games/heretic/files/patch-g__game.c similarity index 87% rename from games/heretic/files/patch-g_game.c rename to games/heretic/files/patch-g__game.c index b4349c583f0a..0f6c980831e2 100644 --- a/games/heretic/files/patch-g_game.c +++ b/games/heretic/files/patch-g__game.c @@ -1,56 +1,56 @@ ---- g_game.c.ori Sun Mar 4 15:44:07 2007 -+++ g_game.c Sun Mar 4 15:50:29 2007 -@@ -91,6 +91,7 @@ +--- g_game.c.orig 2000-05-01 23:54:51 UTC ++++ g_game.c +@@ -91,6 +91,7 @@ int starttime; boolean viewactive; boolean deathmatch; /* only if started as net death */ +boolean respawnartifacts; /* respawning Artifacts */ boolean netgame; /* only true if packets are broadcast */ boolean playeringame[MAXPLAYERS]; player_t players[MAXPLAYERS]; -@@ -122,6 +123,7 @@ +@@ -122,6 +123,7 @@ extern char* homedir; long key_right, key_left, key_up, key_down; long key_strafeleft, key_straferight; long key_fire, key_use, key_strafe, key_speed; +long key_health, key_tomeofpower, key_egg, key_firebomb; long key_flyup, key_flydown, key_flycenter; long key_lookup, key_lookdown, key_lookcenter; long key_invleft, key_invright, key_useartifact; -@@ -361,13 +363,34 @@ +@@ -361,13 +363,34 @@ void G_BuildTiccmd (ticcmd_t *cmd) } } } - if(gamekeydown[127] && !cmd->arti + if(gamekeydown[key_tomeofpower] && !cmd->arti && !players[consoleplayer].powers[pw_weaponlevel2]) { - gamekeydown[127] = false; + gamekeydown[key_tomeofpower] = false; cmd->arti = arti_tomeofpower; } - + // Health by key: + if(gamekeydown[key_health] && !cmd->arti) + { + gamekeydown[key_health] = false; + cmd->arti = arti_health; + } + + // Egg by key: + if(gamekeydown[key_egg] && !cmd->arti) + { + gamekeydown[key_egg] = false; + cmd->arti = arti_egg; + } + + // Timebombe by key: + if(gamekeydown[key_firebomb] && !cmd->arti) + { + gamekeydown[key_firebomb] = false; + cmd->arti = arti_firebomb; + } + + /* * buttons */ diff --git a/games/heretic/files/patch-graphics__i_sdl.c b/games/heretic/files/patch-graphics_i__sdl.c similarity index 71% rename from games/heretic/files/patch-graphics__i_sdl.c rename to games/heretic/files/patch-graphics_i__sdl.c index 928a8bce6639..a963f21b9637 100644 --- a/games/heretic/files/patch-graphics__i_sdl.c +++ b/games/heretic/files/patch-graphics_i__sdl.c @@ -1,11 +1,11 @@ ---- graphics/i_sdl.c 2002/04/17 17:57:00 1.1 -+++ graphics/i_sdl.c 2002/04/17 17:57:08 +--- graphics/i_sdl.c.orig 2000-05-01 23:49:49 UTC ++++ graphics/i_sdl.c @@ -7,7 +7,7 @@ #include #include "doomdef.h" -#include "SDL/SDL.h" +#include "SDL.h" static int lastmousex = 0; static int lastmousey = 0; diff --git a/games/heretic/files/patch-graphics__i_sdl_gl.c b/games/heretic/files/patch-graphics_i__sdl__gl.c similarity index 58% rename from games/heretic/files/patch-graphics__i_sdl_gl.c rename to games/heretic/files/patch-graphics_i__sdl__gl.c index 032fde580f45..796b1c8a31e0 100644 --- a/games/heretic/files/patch-graphics__i_sdl_gl.c +++ b/games/heretic/files/patch-graphics_i__sdl__gl.c @@ -1,11 +1,11 @@ ---- graphics/i_sdl_gl.c 2002/04/17 17:57:00 1.1 -+++ graphics/i_sdl_gl.c 2002/04/17 17:57:14 +--- graphics/i_sdl_gl.c.orig 2000-05-01 23:49:05 UTC ++++ graphics/i_sdl_gl.c @@ -4,7 +4,7 @@ #include #include "doomdef.h" -#include +#include #include "gl_struct.h" diff --git a/games/heretic/files/patch-graphics-i_x11_fast.c b/games/heretic/files/patch-graphics_i__x11__fast.c similarity index 83% rename from games/heretic/files/patch-graphics-i_x11_fast.c rename to games/heretic/files/patch-graphics_i__x11__fast.c index 4d4fcc7d7178..7825c50dbace 100644 --- a/games/heretic/files/patch-graphics-i_x11_fast.c +++ b/games/heretic/files/patch-graphics_i__x11__fast.c @@ -1,16 +1,16 @@ ---- graphics/i_x11_fast.c.orig Fri Dec 29 20:03:37 2006 -+++ graphics/i_x11_fast.c Fri Dec 29 20:03:59 2006 -@@ -201,13 +201,9 @@ +--- graphics/i_x11_fast.c.orig 2003-12-08 22:48:58 UTC ++++ graphics/i_x11_fast.c +@@ -201,13 +201,9 @@ int xlatekey(void) /* This is an ugly PC-ism. Better switch to XLookupKeysym() ? */ case XK_KP_Insert: rc = '0'; break; case XK_KP_End: rc = '1'; break; - case XK_KP_Down: rc = '2'; break; case XK_KP_Page_Down: rc = '3'; break; - case XK_KP_Left: rc = '4'; break; case XK_KP_Begin: rc = '5'; break; - case XK_KP_Right: rc = '6'; break; case XK_KP_Home: rc = '7'; break; - case XK_KP_Up: rc = '8'; break; case XK_KP_Page_Up: rc = '9'; break; case XK_Shift_L: diff --git a/games/heretic/files/patch-i_udp.c b/games/heretic/files/patch-i__udp.c similarity index 70% rename from games/heretic/files/patch-i_udp.c rename to games/heretic/files/patch-i__udp.c index e7e198b51796..e0ee0bc209c5 100644 --- a/games/heretic/files/patch-i_udp.c +++ b/games/heretic/files/patch-i__udp.c @@ -1,11 +1,11 @@ ---- i_udp.c.old Sun Oct 20 22:21:11 2002 -+++ i_udp.c Sun Oct 20 22:21:26 2002 +--- i_udp.c.orig 2000-05-01 10:24:52 UTC ++++ i_udp.c @@ -31,7 +31,7 @@ boolean server = 0; -static int DOOMPORT = (IPPORT_USERRESERVED +0x1d ); +static int DOOMPORT = (5000 +0x1d ); /* static int sendsocket; */ /* static int insocket; */ diff --git a/games/heretic/files/patch-m_misc.c b/games/heretic/files/patch-m__misc.c similarity index 84% rename from games/heretic/files/patch-m_misc.c rename to games/heretic/files/patch-m__misc.c index 8a4d803602af..b8d376dd1c30 100644 --- a/games/heretic/files/patch-m_misc.c +++ b/games/heretic/files/patch-m__misc.c @@ -1,21 +1,21 @@ ---- m_misc.c.ori Sun Mar 4 15:50:54 2007 -+++ m_misc.c Sun Mar 4 15:52:40 2007 -@@ -365,6 +365,7 @@ +--- m_misc.c.orig 2000-05-02 00:01:29 UTC ++++ m_misc.c +@@ -365,6 +365,7 @@ long usejoystick; extern long key_right, key_left, key_up, key_down; extern long key_strafeleft, key_straferight; extern long key_fire, key_use, key_strafe, key_speed; +extern long key_health, key_tomeofpower, key_egg, key_firebomb; extern long key_flyup, key_flydown, key_flycenter; extern long key_lookup, key_lookdown, key_lookcenter; extern long key_invleft, key_invright, key_useartifact; -@@ -447,6 +448,10 @@ +@@ -447,6 +448,10 @@ default_t defaults[] = { "key_fire", &key_fire, KEY_RCTRL, 1 }, { "key_use", &key_use, ' ', 1 }, + { "key_health", &key_health, 'a' }, + { "key_tomeofpower", &key_tomeofpower, 127}, + { "key_egg", &key_egg, 'q'}, + { "key_firebomb", &key_firebomb, 'b'}, { "key_strafe", &key_strafe, KEY_RALT, 1 }, { "key_speed", &key_speed, KEY_RSHIFT, 1 }, diff --git a/games/heretic/files/patch-opengl_gl_fonts.c b/games/heretic/files/patch-opengl_gl__fonts.c similarity index 55% rename from games/heretic/files/patch-opengl_gl_fonts.c rename to games/heretic/files/patch-opengl_gl__fonts.c index 26a1436394ef..f6a61eb83c04 100644 --- a/games/heretic/files/patch-opengl_gl_fonts.c +++ b/games/heretic/files/patch-opengl_gl__fonts.c @@ -1,9 +1,9 @@ ---- opengl/gl_fonts.c Sun Jan 30 05:58:21 2000 -+++ opengl/gl_fonts.c.new Sun Feb 13 03:54:46 2000 +--- opengl/gl_fonts.c.orig 2000-05-01 19:17:31 UTC ++++ opengl/gl_fonts.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/games/heretic/files/patch-opengl_gl_struct.h b/games/heretic/files/patch-opengl_gl__struct.h similarity index 60% rename from games/heretic/files/patch-opengl_gl_struct.h rename to games/heretic/files/patch-opengl_gl__struct.h index 009be366cda1..6030b1346549 100644 --- a/games/heretic/files/patch-opengl_gl_struct.h +++ b/games/heretic/files/patch-opengl_gl__struct.h @@ -1,11 +1,11 @@ ---- opengl/gl_struct.h.orig Wed Jan 26 14:38:19 2000 -+++ opengl/gl_struct.h Sun Apr 2 16:43:51 2000 +--- opengl/gl_struct.h.orig 2016-06-20 13:32:45 UTC ++++ opengl/gl_struct.h @@ -2,7 +2,7 @@ - #define __GL_STRUCT_H__ - - #include --#include -+#include - #include - #include - #include + #define __GL_STRUCT_H__ + + #include +-#include ++#include + #include + #include + #include diff --git a/games/heretic/files/patch-opengl_sgi-si_libtess_memalloc.h b/games/heretic/files/patch-opengl_sgi-si_libtess_memalloc.h index 1e6ec40a0817..67d61f3d3928 100644 --- a/games/heretic/files/patch-opengl_sgi-si_libtess_memalloc.h +++ b/games/heretic/files/patch-opengl_sgi-si_libtess_memalloc.h @@ -1,11 +1,11 @@ ---- opengl/sgi-si/libtess/memalloc.h Wed Jan 26 05:30:44 2000 -+++ opengl/sgi-si/libtess/memalloc.h.new Sun Feb 13 03:54:46 2000 +--- opengl/sgi-si/libtess/memalloc.h.orig 2000-01-26 10:30:44 UTC ++++ opengl/sgi-si/libtess/memalloc.h @@ -42,7 +42,7 @@ #ifndef __memalloc_simple_h_ #define __memalloc_simple_h_ -#include +#include #define memRealloc realloc #define memFree free diff --git a/games/heretic/files/patch-p_inter.c b/games/heretic/files/patch-p__inter.c similarity index 76% rename from games/heretic/files/patch-p_inter.c rename to games/heretic/files/patch-p__inter.c index 7e82b1270a86..a954ea25bcd1 100644 --- a/games/heretic/files/patch-p_inter.c +++ b/games/heretic/files/patch-p__inter.c @@ -1,15 +1,15 @@ ---- p_inter.c.ori Sun Mar 4 15:38:51 2007 -+++ p_inter.c Sun Mar 4 15:41:50 2007 -@@ -477,8 +477,10 @@ +--- p_inter.c.orig 2000-01-07 17:58:53 UTC ++++ p_inter.c +@@ -477,8 +477,10 @@ boolean P_GiveArtifact(player_t *player, void P_SetDormantArtifact(mobj_t *arti) { arti->flags &= ~MF_SPECIAL; - if(deathmatch && (arti->type != MT_ARTIINVULNERABILITY) - && (arti->type != MT_ARTIINVISIBILITY)) + if( + (deathmatch && (arti->type != MT_ARTIINVULNERABILITY) + && (arti->type != MT_ARTIINVISIBILITY)) + || (respawnartifacts) ) { P_SetMobjState(arti, S_DORMANTARTI1); } diff --git a/games/heretic/files/patch-r_things.c b/games/heretic/files/patch-r__things.c similarity index 52% rename from games/heretic/files/patch-r_things.c rename to games/heretic/files/patch-r__things.c index 32d15a2484cb..954319b17c9d 100644 --- a/games/heretic/files/patch-r_things.c +++ b/games/heretic/files/patch-r__things.c @@ -1,11 +1,11 @@ ---- r_things.c.orig Thu Jan 27 00:49:35 2000 -+++ r_things.c Fri Dec 29 20:57:02 2006 -@@ -144,7 +144,7 @@ +--- r_things.c.orig 2000-01-26 23:49:35 UTC ++++ r_things.c +@@ -144,7 +144,7 @@ void R_InitSpriteDefs (char **namelist) while (*check != NULL) check++; - numsprites = check-namelist; + numsprites = 128; if (!numsprites) return; diff --git a/games/heretic/files/patch-sndserv_Makefile b/games/heretic/files/patch-sndserv_Makefile index 9293acc923aa..03dbd909fabf 100644 --- a/games/heretic/files/patch-sndserv_Makefile +++ b/games/heretic/files/patch-sndserv_Makefile @@ -1,11 +1,11 @@ ---- sndserv/Makefile.orig Sat Oct 23 11:02:21 1999 -+++ sndserv/Makefile Thu Jan 10 19:34:23 2002 +--- sndserv/Makefile.orig 1999-10-23 09:02:21 UTC ++++ sndserv/Makefile @@ -1,6 +1,6 @@ -CC = gcc +#CC = gcc -CFLAGS= -Wall -Wstrict-prototypes $(COPT.arch) +CFLAGS= -Wall -Wstrict-prototypes $(COPT.arch) -I/usr/include/sys LIBS= -lm diff --git a/games/heretic/files/patch-sndserv_linux.c b/games/heretic/files/patch-sndserv_linux.c index 5aac936495f5..97b1a8b3208b 100644 --- a/games/heretic/files/patch-sndserv_linux.c +++ b/games/heretic/files/patch-sndserv_linux.c @@ -1,11 +1,11 @@ ---- sndserv/linux.c.orig Thu Jan 10 19:06:58 2002 -+++ sndserv/linux.c Thu Jan 10 19:07:06 2002 -@@ -32,7 +32,7 @@ - #include +--- sndserv/linux.c.orig 2003-12-08 22:44:54 UTC ++++ sndserv/linux.c +@@ -33,7 +33,7 @@ #include + #include -#include +#include #include "soundsrv.h" diff --git a/games/heretic/files/patch-sndserv_soundsrv.c b/games/heretic/files/patch-sndserv_soundsrv.c index e7446904c5af..002ce7394273 100644 --- a/games/heretic/files/patch-sndserv_soundsrv.c +++ b/games/heretic/files/patch-sndserv_soundsrv.c @@ -1,11 +1,11 @@ ---- sndserv/soundsrv.c Mon Mar 22 20:06:59 1999 -+++ sndserv/soundsrv.c.new Sun Feb 13 03:54:46 2000 +--- sndserv/soundsrv.c.orig 1999-03-23 01:06:59 UTC ++++ sndserv/soundsrv.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/games/heretic/files/patch-sndserv_wadread.c b/games/heretic/files/patch-sndserv_wadread.c index d878db7c6405..a5338895eed1 100644 --- a/games/heretic/files/patch-sndserv_wadread.c +++ b/games/heretic/files/patch-sndserv_wadread.c @@ -1,11 +1,11 @@ ---- sndserv/wadread.c Thu Nov 25 05:24:49 1999 -+++ sndserv/wadread.c.new Sun Feb 13 03:54:46 2000 +--- sndserv/wadread.c.orig 1999-11-25 10:24:49 UTC ++++ sndserv/wadread.c @@ -39,7 +39,7 @@ */ -#include +#include #include #include #include diff --git a/games/heretic/files/patch-w_wad.c b/games/heretic/files/patch-w__wad.c similarity index 63% rename from games/heretic/files/patch-w_wad.c rename to games/heretic/files/patch-w__wad.c index 74df663cd98a..bad6d45cf355 100644 --- a/games/heretic/files/patch-w_wad.c +++ b/games/heretic/files/patch-w__wad.c @@ -1,19 +1,19 @@ ---- w_wad.c Sat Oct 23 05:02:21 1999 -+++ w_wad.c.new Sun Feb 13 03:52:25 2000 +--- w_wad.c.orig 2003-12-08 23:10:35 UTC ++++ w_wad.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include -@@ -26,8 +25,6 @@ - +@@ -27,8 +26,6 @@ #define O_BINARY 0 #endif /* UNIX */ -- --#include +-#include +- #ifdef __GLIBC__ - #include + /* kludge for broken asm-sparc/io.h on linux 2.2.14.? */ + #ifdef __sparc__ diff --git a/games/quake2-psychomod/Makefile b/games/quake2-psychomod/Makefile index 15fed79654b6..c82664e0c274 100644 --- a/games/quake2-psychomod/Makefile +++ b/games/quake2-psychomod/Makefile @@ -1,37 +1,38 @@ # Created by: Alejandro Pulver # $FreeBSD$ PORTNAME= psychomod PORTVERSION= 3.1 CATEGORIES= games MASTER_SITES= LOCAL/alepulver PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX} MAINTAINER= danfe@FreeBSD.org COMMENT= Psychomod modification for Quake II -USES= gmake tar:bzip2 +USES= dos2unix gmake tar:bzip2 +DOS2UNIX_GLOB= *.c *.h WRKSRC= ${WRKDIR}/${PORTNAME} BUILD_WRKSRC= ${WRKSRC}/src ALL_TARGET= release DOCSDIR= ${PREFIX}/share/doc/${PKGBASE} OPTIONS_DEFINE= DOCS .include "${.CURDIR}/../quake2-data/Makefile.include" post-patch: @${REINPLACE_CMD} -e 's/__linux__/__unix__/' \ ${BUILD_WRKSRC}/q_shared.[ch] do-install: @${MKDIR} ${STAGEDIR}${Q2DIR}/${PORTNAME} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/psychomod/game.so \ ${STAGEDIR}${Q2DIR}/${PORTNAME} cd ${WRKSRC} && ${INSTALL_DATA} *.cfg pak0.pak \ ${STAGEDIR}${Q2DIR}/${PORTNAME} @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR} .include diff --git a/games/quake2-psychomod/files/patch-src__Makefile b/games/quake2-psychomod/files/patch-src_Makefile similarity index 87% rename from games/quake2-psychomod/files/patch-src__Makefile rename to games/quake2-psychomod/files/patch-src_Makefile index db762dd27e91..94b563830d40 100644 --- a/games/quake2-psychomod/files/patch-src__Makefile +++ b/games/quake2-psychomod/files/patch-src_Makefile @@ -1,71 +1,71 @@ ---- ./src/Makefile.orig Wed Feb 1 20:46:55 2006 -+++ ./src/Makefile Wed Jan 10 19:11:16 2007 -@@ -16,20 +16,10 @@ +--- src/Makefile.orig 2006-02-01 23:46:55 UTC ++++ src/Makefile +@@ -16,20 +16,10 @@ OSTYPE := $(shell uname -s) # this nice line comes from the linux kernel makefile ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/) -ifneq ($(ARCH),i386) -ifneq ($(ARCH),axp) -ifneq ($(ARCH),ppc) -ifneq ($(ARCH),sparc) -$(error arch $(ARCH) is currently not supported) -endif -endif -endif -endif - -BUILD_DEBUG_DIR=debug$(ARCH) -BUILD_RELEASE_DIR=release$(ARCH) +BUILD_DEBUG_DIR=debug +BUILD_RELEASE_DIR=release -CC=gcc +CC?=gcc BASE_CFLAGS=-Dstricmp=strcasecmp RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \ -@@ -53,7 +43,7 @@ +@@ -53,7 +43,7 @@ SHLIBLDFLAGS=-shared DO_CC=$(CC) $(CFLAGS) -o $@ -c $< DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< -TARGETS=$(BUILDDIR)/psychomod/game$(ARCH).$(SHLIBEXT) +TARGETS=$(BUILDDIR)/psychomod/game.$(SHLIBEXT) all: @echo -@@ -64,11 +54,11 @@ +@@ -64,11 +54,11 @@ all: @echo debug: @-mkdir -p $(BUILD_DEBUG_DIR)/psychomod - $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)" + $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS+="$(DEBUG_CFLAGS)" release: @-mkdir -p $(BUILD_RELEASE_DIR)/psychomod - $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)" + $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS)" targets: $(TARGETS) -@@ -124,7 +114,7 @@ +@@ -124,7 +114,7 @@ GAME_OBJS = \ $(BUILDDIR)/p_weapon.o \ $(BUILDDIR)/q_shared.o -$(BUILDDIR)/psychomod/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS) +$(BUILDDIR)/psychomod/game.$(SHLIBEXT) : $(GAME_OBJS) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS) $(BUILDDIR)/g_ai.o : g_ai.c -@@ -282,10 +272,10 @@ +@@ -282,10 +272,10 @@ $(BUILDDIR)/q_shared.o : q_shared.c clean: clean-debug clean-release clean-debug: - $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)" + $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS+="$(DEBUG_CFLAGS)" clean-release: - $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)" + $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(DEBUG_CFLAGS)" clean2: -rm -f $(GAME_OBJS) diff --git a/games/quake2-psychomod/files/patch-src__g_items.c b/games/quake2-psychomod/files/patch-src_g__items.c similarity index 74% rename from games/quake2-psychomod/files/patch-src__g_items.c rename to games/quake2-psychomod/files/patch-src_g__items.c index db547b75a80c..acb784328127 100644 --- a/games/quake2-psychomod/files/patch-src__g_items.c +++ b/games/quake2-psychomod/files/patch-src_g__items.c @@ -1,15 +1,15 @@ ---- ./src/g_items.c.orig Wed Oct 10 12:53:12 2001 -+++ ./src/g_items.c Wed Jan 10 19:11:41 2007 -@@ -21,9 +21,9 @@ +--- src/g_items.c.orig 2016-06-20 14:35:21 UTC ++++ src/g_items.c +@@ -21,9 +21,9 @@ gitem_armor_t jacketarmor_info = { 25, gitem_armor_t combatarmor_info = { 50, 100, .60, .30, ARMOR_COMBAT}; gitem_armor_t bodyarmor_info = {100, 200, .80, .60, ARMOR_BODY}; -static int jacket_armor_index; -static int combat_armor_index; -static int body_armor_index; +int jacket_armor_index; +int combat_armor_index; +int body_armor_index; static int power_screen_index; static int power_shield_index; - + diff --git a/games/scorched3d/Makefile b/games/scorched3d/Makefile index 3dd9ad73a43b..3a7fa520e580 100644 --- a/games/scorched3d/Makefile +++ b/games/scorched3d/Makefile @@ -1,76 +1,74 @@ # Created by: mdodd # $FreeBSD$ PORTNAME= scorched3d PORTVERSION= 0.${SCORCH_VERSION}${SCORCH_REVISION} PORTREVISION= 9 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/Version%20${SCORCH_VERSION} DISTNAME= Scorched3D-${SCORCH_VERSION}-src MAINTAINER= ports@FreeBSD.org COMMENT= 3D version of the classic DOS game Scorched Earth LICENSE= GPLv2 LIB_DEPENDS= libvorbis.so:audio/libvorbis \ libpng.so:graphics/png \ libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ libexpat.so:textproc/expat2 OPTIONS_DEFINE= MYSQL WRKSRC= ${WRKDIR}/scorched USE_GL= glew glu USE_SDL= mixer net sdl USE_WX= 2.8 WX_CONF_ARGS= absolute -WX_UNICODE= yes USES= autoreconf dos2unix gmake iconv jpeg openal:al,alut perl5 pkgconfig GNU_CONFIGURE= yes CONFIGURE_ARGS= --datadir=${DATADIR} -DOS2UNIX_FILES= src/client/GLEXT/GLFont2dFreeType.h \ - src/launcher/wxdialogs/TrueTypeFont.h +DOS2UNIX_GLOB= *.h *.cpp CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib SCORCH_VERSION= 43.3d SCORCH_REVISION= # none MYSQL_USE= MYSQL=yes MYSQL_CONFIGURE_ON= --with-mysql PLIST_FILES= bin/scorched3d \ bin/scorched3dc \ bin/scorched3ds PORTDATA= * post-extract: @${RM} -f ${WRKSRC}/src/client/GLEXT/[a-z]* post-patch: @${REINPLACE_CMD} -e \ '/^CPPFLAGS=/s|^|#|g ; \ /^LDFLAGS=/s|^|#|g ; \ /if test/s|==|=|' ${WRKSRC}/configure.ac @${REINPLACE_CMD} -e \ '/GL_LIBS/s|"-lGL -lGLU"|"-lGL -lGLU -lGLEW"| ; \ /if test/s|==|=|' ${WRKSRC}/*.m4 @${REINPLACE_CMD} -e \ 's|std::exit|exit|' ${WRKSRC}/src/common/common/main.h @${REINPLACE_CMD} -e \ 's|"glew.h"||' ${WRKSRC}/src/client/GLEXT/GLState.h @${REINPLACE_CMD} -e \ '/GLEXT\\glew.c/d ; \ /GLEXT\\glew.h/d ; \ /GLEXT\\glxew.h/d ; \ /GLEXT\\wglew.h/d' ${WRKSRC}/src/client/scorchedc/scorchedc.vcxproj pre-configure: @cd ${WRKSRC}/scripts && ${PERL} createAMMakefile.pl .include diff --git a/games/scorched3d/files/patch-configure-al.m4 b/games/scorched3d/files/patch-configure-al.m4 index 73c5ca668787..76adaf5a2820 100644 --- a/games/scorched3d/files/patch-configure-al.m4 +++ b/games/scorched3d/files/patch-configure-al.m4 @@ -1,125 +1,125 @@ ---- configure-al.m4.orig 2011-12-31 23:51:36.000000000 +0900 -+++ configure-al.m4 2012-03-08 02:09:57.000000000 +0900 +--- configure-al.m4.orig 2011-12-31 14:51:36 UTC ++++ configure-al.m4 @@ -1,118 +1,8 @@ dnl Checking for OpenAL -AC_ARG_WITH([openal-static], - AC_HELP_STRING([--with-openal-static], - [enable static linking for openal (default no)]), - [use_static_openal=${withval}],,) -AC_ARG_ENABLE(openaltest, - [ --disable-openaltest Do not try to compile and run a test OpenAL program], - , enable_openaltest=yes) -AC_MSG_CHECKING(for OpenAL support) -AC_PATH_PROG(OPENAL_CONFIG, openal-config, no) -if test x$OPENAL_CONFIG = xno; then - echo "The openal-config script installed by OpenAL could not be found" - echo "Make sure openal-config is in your path, or set the OPENAL_CONFIG" - echo "environment variable to the full path to openal-config." - echo "Trying pkg-config instead." - - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG = xno; then - echo "The pkg-config script could not be found" - echo "Make sure pkg-config is in your path, or set the PKG_CONFIG" - echo "environment variable to the full path to pkg-config." - - AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/]) - else - OPENAL_CONFIG="$PKG_CONFIG openal"; - fi -fi - -if test x"$use_static_openal" = x"yes"; then - AL_LIBS="/usr/local/lib/libopenal.a" -else - AL_LIBS="`$OPENAL_CONFIG --libs`" -fi - -AL_CFLAGS="`$OPENAL_CONFIG --cflags`" - -AC_MSG_RESULT(yes) - -AC_MSG_CHECKING(for Freealut support) -AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no) -if test x$FREEALUT_CONFIG = xno; then - echo "*** Warning: The freealut-config script installed by OpenAL could not be found." - echo "*** The alut library is required, however some older OpenAL distribitions may include it." - echo "*** If Scorched3D fails to link check alut is in the link line." - echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG" - echo "*** environment variable to the full path to openal-config." -else - - AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`" - AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`" - - AC_MSG_RESULT(yes) -fi - -AC_MSG_CHECKING(for OpenAL compilation) -if test "x$enable_openaltest" = "xyes" ; then - - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $AL_CFLAGS" - LIBS="$AL_LIBS $LIBS" - - AC_TRY_COMPILE([ -#ifdef __APPLE__ - #include - #include -#else - #include - #include - #include -#endif - - ],[ - ],[ - have_openal=yes - ],[ - echo "*** Failed to compile using the OpenAL library." - echo "*** CFLAGS = $AL_CFLAGS"; - AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) - ]) - - AC_TRY_LINK([ -#ifdef __APPLE__ - #include - #include -#else - #include - #include - #include -#endif - - int main(int argc, char *argv[]) - { - alutInit(argc, argv); - return 0; - } -#undef main -#define main K_and_R_C_main - - ],[ - ],[ - have_openal=yes - ],[ - echo "*** Compiled but failed to link using the OpenAL library." - echo "*** LIBS = $AL_LIBS"; - echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH"; - AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) - ]) - - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - - AC_MSG_RESULT(yes) -fi - +PKG_CHECK_MODULES([OPENAL], [openal]) +PKG_CHECK_MODULES([FREEALUT], [freealut]) +AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS" +AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS" AC_SUBST(AL_CFLAGS) AC_SUBST(AL_LIBS) diff --git a/games/scorched3d/files/patch-src_client_GLEXT_GLFont2dFreeType.h b/games/scorched3d/files/patch-src_client_GLEXT_GLFont2dFreeType.h index 5bcad3c1b8ff..b8fe14351be9 100644 --- a/games/scorched3d/files/patch-src_client_GLEXT_GLFont2dFreeType.h +++ b/games/scorched3d/files/patch-src_client_GLEXT_GLFont2dFreeType.h @@ -1,17 +1,17 @@ ---- src/client/GLEXT/GLFont2dFreeType.h.orig 2013-12-17 09:58:11.000000000 +0100 -+++ src/client/GLEXT/GLFont2dFreeType.h 2013-12-17 09:59:18.000000000 +0100 +--- src/client/GLEXT/GLFont2dFreeType.h.orig 2016-06-20 14:16:37 UTC ++++ src/client/GLEXT/GLFont2dFreeType.h @@ -23,10 +23,10 @@ #include #include -#include -#include -#include -#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_OUTLINE_H +#include FT_TRIGONOMETRY_H #include class GLFont2dFreeType diff --git a/games/scorched3d/files/patch-src__client__client__LoadPNG.cpp b/games/scorched3d/files/patch-src_client_client_LoadPNG.cpp similarity index 82% rename from games/scorched3d/files/patch-src__client__client__LoadPNG.cpp rename to games/scorched3d/files/patch-src_client_client_LoadPNG.cpp index 8db4ee8ad643..138a50aead91 100644 --- a/games/scorched3d/files/patch-src__client__client__LoadPNG.cpp +++ b/games/scorched3d/files/patch-src_client_client_LoadPNG.cpp @@ -1,63 +1,63 @@ ---- src/client/client/LoadPNG.cpp.orig 2010-08-16 08:26:36.000000000 +0900 -+++ src/client/client/LoadPNG.cpp 2012-03-07 19:25:24.000000000 +0900 -@@ -28,6 +28,8 @@ +--- src/client/client/LoadPNG.cpp.orig 2016-06-20 14:16:37 UTC ++++ src/client/client/LoadPNG.cpp +@@ -28,6 +28,8 @@ SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *s int row, i; volatile int ckey = -1; png_color_16 *transv; + png_colorp png_palette; + int num_palette; if ( !src ) { /* The error message has been set in SDL_RWFromFile */ -@@ -58,7 +60,7 @@ +@@ -58,7 +60,7 @@ SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *s * the normal method of doing things with libpng). REQUIRED unless you * set up your own error handlers in png_create_read_struct() earlier. */ - if ( setjmp(png_ptr->jmpbuf) ) { + if ( setjmp(png_jmpbuf(png_ptr)) ) { error = "Error reading the PNG file."; goto done; } -@@ -127,9 +129,9 @@ +@@ -127,9 +129,9 @@ SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *s Rmask = 0x000000FF; Gmask = 0x0000FF00; Bmask = 0x00FF0000; - Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; + Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; } else { - int s = (info_ptr->channels == 4) ? 0 : 8; + int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; Rmask = 0xFF000000 >> s; Gmask = 0x00FF0000 >> s; Bmask = 0x0000FF00 >> s; -@@ -137,7 +139,7 @@ +@@ -137,7 +139,7 @@ SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *s } } surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, - bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); + bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); if ( surface == NULL ) { error = "Out of memory"; goto done; -@@ -185,12 +187,15 @@ +@@ -185,12 +187,15 @@ SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *s palette->colors[i].g = i; palette->colors[i].b = i; } - } else if (info_ptr->num_palette > 0 ) { - palette->ncolors = info_ptr->num_palette; - for( i=0; inum_palette; ++i ) { - palette->colors[i].b = info_ptr->palette[i].blue; - palette->colors[i].g = info_ptr->palette[i].green; - palette->colors[i].r = info_ptr->palette[i].red; + } else { + png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette); + if (num_palette > 0 ) { + palette->ncolors = num_palette; + for( i=0; icolors[i].b = png_palette[i].blue; + palette->colors[i].g = png_palette[i].green; + palette->colors[i].r = png_palette[i].red; + } } } } diff --git a/games/scorched3d/files/patch-src-client-client-SecureID.cpp b/games/scorched3d/files/patch-src_client_client_SecureID.cpp similarity index 87% rename from games/scorched3d/files/patch-src-client-client-SecureID.cpp rename to games/scorched3d/files/patch-src_client_client_SecureID.cpp index 5701b71b4221..b1549c629724 100644 --- a/games/scorched3d/files/patch-src-client-client-SecureID.cpp +++ b/games/scorched3d/files/patch-src_client_client_SecureID.cpp @@ -1,50 +1,50 @@ ---- src/client/client/SecureID.cpp.orig 2008-03-03 00:47:36.000000000 +0600 -+++ src/client/client/SecureID.cpp 2009-09-29 14:13:58.000000000 +0700 -@@ -34,6 +34,47 @@ - return "0:0:0:0:0:0"; - } - +--- src/client/client/SecureID.cpp.orig 2016-06-20 14:16:37 UTC ++++ src/client/client/SecureID.cpp +@@ -71,6 +71,47 @@ std::string SecureID::GetPrivateKey(void + return result; + } + +#elif defined(__FreeBSD__) + +#include +#include +#include +#include + +std::string SecureID::GetPrivateKey(void) +{ + std::string Key; + struct ifaddrs* ifaphead; + + if (getifaddrs(&ifaphead) != 0) + { + return ""; + } + + for (struct ifaddrs* ifap = ifaphead; ifap; ifap = ifap->ifa_next) + { + if (ifap->ifa_addr->sa_family == AF_LINK) + { + if (strncmp(ifap->ifa_name, "lo", 2) != 0) + { + struct sockaddr_dl* sdl = + (struct sockaddr_dl *)ifap->ifa_addr; + unsigned char* if_mac = (unsigned char*)LLADDR(sdl); + char buf[18]; + snprintf(buf, 18, + "%02x:%02x:%02x:%02x:%02x:%02x", + if_mac[0], if_mac[1], if_mac[2], + if_mac[3], if_mac[4], if_mac[5]); + Key = buf; + break; + } + } + } + + freeifaddrs(ifaphead); + return Key; +} + - #else - - #include + #else + + #include diff --git a/games/scorched3d/files/patch-src__common__image__ImagePngFactory.cpp b/games/scorched3d/files/patch-src_common_image_ImagePngFactory.cpp similarity index 54% rename from games/scorched3d/files/patch-src__common__image__ImagePngFactory.cpp rename to games/scorched3d/files/patch-src_common_image_ImagePngFactory.cpp index 43ad7a9ca254..1afd54ffe0da 100644 --- a/games/scorched3d/files/patch-src__common__image__ImagePngFactory.cpp +++ b/games/scorched3d/files/patch-src_common_image_ImagePngFactory.cpp @@ -1,11 +1,11 @@ ---- src/common/image/ImagePngFactory.cpp.orig 2012-01-10 09:52:15.000000000 +0900 -+++ src/common/image/ImagePngFactory.cpp 2012-03-07 18:31:12.000000000 +0900 -@@ -62,7 +62,7 @@ - - static void user_png_error(png_structp png_ptr, png_const_charp msg) - { -- longjmp(png_ptr->jmpbuf,1); -+ longjmp(png_jmpbuf(png_ptr),1); - } - - static void user_png_warning(png_structp png_ptr, png_const_charp msg) +--- src/common/image/ImagePngFactory.cpp.orig 2016-06-20 14:16:37 UTC ++++ src/common/image/ImagePngFactory.cpp +@@ -62,7 +62,7 @@ struct user_read_struct + + static void user_png_error(png_structp png_ptr, png_const_charp msg) + { +- longjmp(png_ptr->jmpbuf,1); ++ longjmp(png_jmpbuf(png_ptr),1); + } + + static void user_png_warning(png_structp png_ptr, png_const_charp msg) diff --git a/games/scorched3d/files/patch-src__common__porting__windows.h b/games/scorched3d/files/patch-src_common_porting_windows.h similarity index 65% rename from games/scorched3d/files/patch-src__common__porting__windows.h rename to games/scorched3d/files/patch-src_common_porting_windows.h index 7c591c924c22..35521a22ba48 100644 --- a/games/scorched3d/files/patch-src__common__porting__windows.h +++ b/games/scorched3d/files/patch-src_common_porting_windows.h @@ -1,18 +1,18 @@ ---- src/common/porting/windows.h.orig 2008-03-03 03:47:36.000000000 +0900 -+++ src/common/porting/windows.h 2012-03-07 18:29:31.000000000 +0900 +--- src/common/porting/windows.h.orig 2016-06-20 14:16:37 UTC ++++ src/common/porting/windows.h @@ -9,6 +9,7 @@ - #include - #include - -+#if defined(_WIN32) - typedef char * LPSTR; - typedef const char * LPCTSTR; - typedef unsigned int DWORD; -@@ -27,6 +28,7 @@ - typedef int LRESULT; - typedef void * HDC; - typedef void * HGLRC; -+#endif - - #define _strnicmp(a,b,c) strncasecmp(a,b,c) - #define stricmp(a,b) strcasecmp(a,b) + #include + #include + ++#if defined(_WIN32) + typedef char * LPSTR; + typedef const char * LPCTSTR; + typedef unsigned int DWORD; +@@ -27,6 +28,7 @@ typedef int LPARAM; + typedef int LRESULT; + typedef void * HDC; + typedef void * HGLRC; ++#endif + + #define _strnicmp(a,b,c) strncasecmp(a,b,c) + #define stricmp(a,b) strcasecmp(a,b) diff --git a/games/scorched3d/files/patch-src_launcher_wxdialogs_TrueTypeFont.h b/games/scorched3d/files/patch-src_launcher_wxdialogs_TrueTypeFont.h index d3f212392a55..1c6f5fad2761 100644 --- a/games/scorched3d/files/patch-src_launcher_wxdialogs_TrueTypeFont.h +++ b/games/scorched3d/files/patch-src_launcher_wxdialogs_TrueTypeFont.h @@ -1,17 +1,17 @@ ---- src/launcher/wxdialogs/TrueTypeFont.h.orig 2013-12-17 10:01:02.000000000 +0100 -+++ src/launcher/wxdialogs/TrueTypeFont.h 2013-12-17 10:01:16.000000000 +0100 +--- src/launcher/wxdialogs/TrueTypeFont.h.orig 2016-06-20 14:16:37 UTC ++++ src/launcher/wxdialogs/TrueTypeFont.h @@ -25,10 +25,10 @@ #include #include #include -#include -#include -#include -#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_OUTLINE_H +#include FT_TRIGONOMETRY_H class TrueTypeFont { diff --git a/graphics/c-a-i-r/Makefile b/graphics/c-a-i-r/Makefile index 7817ee3d6062..a4db05a84714 100644 --- a/graphics/c-a-i-r/Makefile +++ b/graphics/c-a-i-r/Makefile @@ -1,24 +1,25 @@ # Created by: buganini@gmail.com # $FreeBSD$ PORTNAME= c-a-i-r PORTVERSION= 2.19 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/CAIR%20v${PORTVERSION} DISTNAME= CAIR_v${PORTVERSION} MAINTAINER= buganini@gmail.com COMMENT= Content Aware Image Resizer is an implementation of seam carving -USES= gmake zip +USES= dos2unix gmake zip +DOS2UNIX_GLOB= *.cpp MAKE_ARGS+= CC="${CXX}" WRKSRC= ${WRKDIR} PLIST_FILES= bin/cair do-install: ${INSTALL_PROGRAM} ${WRKSRC}/cair ${STAGEDIR}${PREFIX}/bin .include diff --git a/graphics/c-a-i-r/files/patch-CAIR.cpp b/graphics/c-a-i-r/files/patch-CAIR.cpp index 9292b9dbe1bc..ea099db1c685 100644 --- a/graphics/c-a-i-r/files/patch-CAIR.cpp +++ b/graphics/c-a-i-r/files/patch-CAIR.cpp @@ -1,38 +1,38 @@ ---- CAIR.cpp.orig 2010-03-16 08:51:06.000000000 +0800 -+++ CAIR.cpp 2010-03-16 08:55:11.000000000 +0800 -@@ -276,7 +276,7 @@ - //Our thread function for the Grayscale - void * Gray_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - - while( true ) - { -@@ -437,7 +437,7 @@ - //The thread function, splitting the image into strips - void * Edge_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - - while( true ) - { -@@ -744,7 +744,7 @@ - //This works like Remove_Quadrant, strips across the image. - void * Add_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - Thread_Params add_area; - - while( true ) -@@ -907,7 +907,7 @@ - //the areas are not quadrants, rather, more like strips, but I keep the name convention - void * Remove_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - Thread_Params remove_area; - - while( true ) +--- CAIR.cpp.orig 2016-06-20 15:51:27 UTC ++++ CAIR.cpp +@@ -276,7 +276,7 @@ inline CML_byte Grayscale_Pixel( CML_RGB + //Our thread function for the Grayscale + void * Gray_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + + while( true ) + { +@@ -437,7 +437,7 @@ int Convolve_Pixel( CML_image_ptr * Sour + //The thread function, splitting the image into strips + void * Edge_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + + while( true ) + { +@@ -744,7 +744,7 @@ CML_RGBA Average_Pixels( CML_RGBA Pixel1 + //This works like Remove_Quadrant, strips across the image. + void * Add_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + Thread_Params add_area; + + while( true ) +@@ -907,7 +907,7 @@ bool CAIR_Add( CML_image * Source, CML_i + //the areas are not quadrants, rather, more like strips, but I keep the name convention + void * Remove_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + Thread_Params remove_area; + + while( true ) diff --git a/graphics/picpuz/Makefile b/graphics/picpuz/Makefile index 3d9277fd8bf2..ec862e9b9107 100644 --- a/graphics/picpuz/Makefile +++ b/graphics/picpuz/Makefile @@ -1,30 +1,31 @@ # Created by: Stas Timokhin # $FreeBSD$ PORTNAME= picpuz PORTVERSION= 2.1.1 PORTREVISION= 5 CATEGORIES= graphics games MASTER_SITES= http://kornelix.squarespace.com/storage/downloads/ \ http://www.stasyan.com/devel/distfiles/ MAINTAINER= devel@stasyan.com COMMENT= Jigsaw puzzle program -USES= execinfo gmake pkgconfig +USES= dos2unix execinfo gmake pkgconfig +DOS2UNIX_GLOB= *.h USE_GNOME= gtk20 ALL_TARGET= # #RUN_DEPENDS+= xdg-desktop-menu:devel/xdg-utils DESKTOP_ENTRIES="Picpuz" \ "Jigsaw Puzzle" \ "${PREFIX}/share/pixmaps/picpuz.png" \ "picpuz" \ "Graphics;Game;GTK;" \ true post-install: (cd ${STAGEDIR}${PREFIX}/share/pixmaps && \ ${LN} -s ${DATADIR}/icons/picpuz.png .) .include diff --git a/graphics/picpuz/files/patch-Makefile b/graphics/picpuz/files/patch-Makefile index c75beed6f02b..bdb765ed5381 100644 --- a/graphics/picpuz/files/patch-Makefile +++ b/graphics/picpuz/files/patch-Makefile @@ -1,54 +1,54 @@ ---- Makefile.orig 2009-10-29 09:38:40.000000000 +0100 -+++ Makefile 2014-02-18 19:19:51.140331100 +0100 -@@ -6,7 +6,7 @@ +--- Makefile.orig 2009-10-29 08:38:40 UTC ++++ Makefile +@@ -6,7 +6,7 @@ SOURCE = $(PROGRAM)-$(VERSION).cpp # replace CFLAGS and LFLAGS -O (oh) with -g for GDB debugging CFLAGS = -O -Wall -c `pkg-config --cflags gtk+-2.0` -LFLAGS = -O -Wall -rdynamic `pkg-config --libs gtk+-2.0 gthread-2.0` +LFLAGS = -O -Wall -rdynamic -lexecinfo `pkg-config --libs gtk+-2.0 gthread-2.0` # use $PREFIX if defined, else assume /usr/local ifeq "$(PREFIX)" "" -@@ -19,14 +19,14 @@ +@@ -19,14 +19,14 @@ DOCDIR = $(PREFIX)/share/doc/$(PROGRAM) DESKTOP = $(DATADIR)/kornelix-$(PROGRAM).desktop $(PROGRAM): $(PROGRAM).o zfuncs.o - @ g++ $(LFLAGS) -o $(PROGRAM) $(PROGRAM).o zfuncs.o + @ ${CXX} $(LFLAGS) -o $(PROGRAM) $(PROGRAM).o zfuncs.o $(PROGRAM).o: $(SOURCE) zfuncs.h - @ g++ $(CFLAGS) -o $(PROGRAM).o $(SOURCE) \ + @ ${CXX} $(CFLAGS) -o $(PROGRAM).o $(SOURCE) \ -D "DATADIR=\"$(DATADIR)\"" -D "DOCDIR=\"$(DOCDIR)\"" zfuncs.o: zfuncs.cpp zfuncs.h - @ g++ $(CFLAGS) zfuncs.cpp \ + @ ${CXX} $(CFLAGS) zfuncs.cpp \ -D "DATADIR=\"$(DATADIR)\"" -D "DOCDIR=\"$(DOCDIR)\"" -D "BINDIR=\"$(BINDIR)\"" install: $(PROGRAM) -@@ -39,15 +39,15 @@ +@@ -39,15 +39,15 @@ install: $(PROGRAM) cp $(PROGRAM) $(DESTDIR)$(BINDIR) cp -R locales/* $(DESTDIR)$(DATADIR)/locales # install .desktop file (menu entry) - @echo "[Desktop Entry]" > $(DESKTOP) - @echo "Name=$(PROGRAM)" >> $(DESKTOP) - @echo "Categories=Game" >> $(DESKTOP) - @echo "Type=Application" >> $(DESKTOP) - @echo "Terminal=false" >> $(DESKTOP) - @echo "Exec=$(BINDIR)/$(PROGRAM)" >> $(DESKTOP) - @echo "Icon=$(DATADIR)/icons/$(PROGRAM).png" >> $(DESKTOP) - @echo "GenericName=Jigsaw Puzzle" >> $(DESKTOP) - xdg-desktop-menu install $(DESKTOP) +# @echo "[Desktop Entry]" > $(DESKTOP) +# @echo "Name=$(PROGRAM)" >> $(DESKTOP) +# @echo "Categories=Game" >> $(DESKTOP) +# @echo "Type=Application" >> $(DESKTOP) +# @echo "Terminal=false" >> $(DESKTOP) +# @echo "Exec=$(BINDIR)/$(PROGRAM)" >> $(DESKTOP) +# @echo "Icon=$(DATADIR)/icons/$(PROGRAM).png" >> $(DESKTOP) +# @echo "GenericName=Jigsaw Puzzle" >> $(DESKTOP) +# xdg-desktop-menu install $(DESKTOP) uninstall: xdg-desktop-menu uninstall $(DESKTOP) diff --git a/graphics/picpuz/files/patch-zfuncs.cpp b/graphics/picpuz/files/patch-zfuncs.cpp index f5e5d7f228f2..16f9033b5509 100644 --- a/graphics/picpuz/files/patch-zfuncs.cpp +++ b/graphics/picpuz/files/patch-zfuncs.cpp @@ -1,41 +1,41 @@ ---- zfuncs.cpp.orig 2009-10-29 08:38:40.000000000 +0000 -+++ zfuncs.cpp 2013-03-30 09:06:21.000000000 +0000 +--- zfuncs.cpp.orig 2009-10-29 08:38:40 UTC ++++ zfuncs.cpp @@ -23,6 +23,11 @@ // zfuncs.cpp version v.2.28 #include "zfuncs.h" +#ifdef __FreeBSD__ +#include +#include +#include +#endif /************************************************************************** system-level utility functions -@@ -236,7 +241,7 @@ +@@ -236,7 +241,7 @@ void synch_threads(int NT) // safely access parameters from multiple threads // limitation: one lock for any number of parameters -mutex zget_lock = PTHREAD_MUTEX_INITIALIZER; +mutex_tp zget_lock = PTHREAD_MUTEX_INITIALIZER; int zget_locked(int ¶m) // lock and return parameter { -@@ -2916,7 +2921,7 @@ +@@ -2916,7 +2921,7 @@ int initz_appfiles(const char *appname, strcpy(zicondir,zdatadir); strcat(zicondir,"/icons"); - pp = cuserid(0); + pp = getpwuid(geteuid())->pw_name; if (strEqu(pp,"root")) snprintf(zuserdir,199,"/root/.%s",zappname); // get /root/.appname else snprintf(zuserdir,199,"%s/.%s",getenv("HOME"),zappname); // or /home/user/.appname -@@ -3415,7 +3420,7 @@ +@@ -3415,7 +3420,7 @@ pthread_t tid_main = 0; pthread_t tids[tmax]; int tlocks[tmax]; int zinit = 0; -mutex zmutex; +mutex_tp zmutex; void zlockInit() // initz. call from main() { diff --git a/graphics/picpuz/files/patch-zfuncs.h b/graphics/picpuz/files/patch-zfuncs.h index 64aab991edc2..35cc9f2c69f5 100644 --- a/graphics/picpuz/files/patch-zfuncs.h +++ b/graphics/picpuz/files/patch-zfuncs.h @@ -1,223 +1,223 @@ ---- zfuncs.h.orig 2009-10-29 08:38:40.000000000 +0000 -+++ zfuncs.h 2013-03-30 09:03:57.000000000 +0000 +--- zfuncs.h.orig 2016-06-20 15:52:16 UTC ++++ zfuncs.h @@ -36,7 +36,201 @@ #include #include #include -#include +// inotify_local.h injected directly into zfuncs.h + +/* + * inotify_local.h - wrapping of libc features and kernel defines + * + * Copyright (C) 2005-2006 Kay Sievers + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef _INOTIFY_LOCAL_H_ +#define _INOTIFY_LOCAL_H_ + +#include +#include +#include + +/* needed until Inotify! syscalls reach glibc */ +#include +#ifndef __NR_inotify_init +#if defined(__i386__) +# define __NR_inotify_init 291 +# define __NR_inotify_add_watch 292 +# define __NR_inotify_rm_watch 293 +#elif defined(__x86_64__) +# define __NR_inotify_init 253 +# define __NR_inotify_add_watch 254 +# define __NR_inotify_rm_watch 255 +#elif defined(__powerpc__) || defined(__powerpc64__) +# define __NR_inotify_init 275 +# define __NR_inotify_add_watch 276 +# define __NR_inotify_rm_watch 277 +#elif defined (__ia64__) +# define __NR_inotify_init 1277 +# define __NR_inotify_add_watch 1278 +# define __NR_inotify_rm_watch 1279 +#elif defined (__s390__) +# define __NR_inotify_init 284 +# define __NR_inotify_add_watch 285 +# define __NR_inotify_rm_watch 286 +#elif defined (__mc68000__) +# define __NR_inotify_init 284 +# define __NR_inotify_add_watch 285 +# define __NR_inotify_rm_watch 286 +#elif defined (__alpha__) +# define __NR_inotify_init 444 +# define __NR_inotify_add_watch 445 +# define __NR_inotify_rm_watch 446 +#elif defined (__sparc__) || defined (__sparc64__) +# define __NR_inotify_init 151 +# define __NR_inotify_add_watch 152 +# define __NR_inotify_rm_watch 156 +#elif defined (__arm__) +# define __NR_inotify_init __NR_SYSCALL_BASE+316 +# define __NR_inotify_add_watch __NR_SYSCALL_BASE+317 +# define __NR_inotify_rm_watch __NR_SYSCALL_BASE+318 +#elif defined (__sh__) +# define __NR_inotify_init 290 +# define __NR_inotify_add_watch 291 +# define __NR_inotify_rm_watch 292 +#elif defined (__m32r__) +# define __NR_inotify_init 290 +# define __NR_inotify_add_watch 291 +# define __NR_inotify_rm_watch 292 +#elif defined (__hppa__) +# define __NR_inotify_init 269 +# define __NR_inotify_add_watch 270 +# define __NR_inotify_rm_watch 271 +#elif defined (__mips__) +# include +# if _MIPS_SIM == _MIPS_SIM_ABI32 +# define __NR_Linux 4000 +# define __NR_inotify_init (__NR_Linux + 284) +# define __NR_inotify_add_watch (__NR_Linux + 285) +# define __NR_inotify_rm_watch (__NR_Linux + 286) +# elif _MIPS_SIM == _MIPS_SIM_ABI64 +# define __NR_Linux 5000 +# define __NR_inotify_init (__NR_Linux + 243) +# define __NR_inotify_add_watch (__NR_Linux + 244) +# define __NR_inotify_rm_watch (__NR_Linux + 245) +# elif _MIPS_SIM == _MIPS_SIM_NABI32 +# define __NR_Linux 6000 +# define __NR_inotify_init (__NR_Linux + 247) +# define __NR_inotify_add_watch (__NR_Linux + 248) +# define __NR_inotify_rm_watch (__NR_Linux + 249) +# endif +#else +# warning "inotify unsupported on this architecture!" +#endif +#endif /* __NR_inotify_init */ + +/* dummy if we don't have the syscalls defined */ +#ifndef __NR_inotify_init +static inline int inotify_init(void) +{ + return -1; +} + +static inline int inotify_add_watch(int fd, const char *name, uint32_t mask) +{ + return -1; +} + +static inline int inotify_rm_watch(int fd, uint32_t wd) +{ + return -1; +} +#else +static inline int inotify_init(void) +{ + return syscall(__NR_inotify_init); +} + +static inline int inotify_add_watch(int fd, const char *name, uint32_t mask) +{ + return syscall(__NR_inotify_add_watch, fd, name, mask); +} + +static inline int inotify_rm_watch(int fd, uint32_t wd) +{ + return syscall(__NR_inotify_rm_watch, fd, wd); +} +#endif /* __NR_inotify_init */ + +#ifndef IN_CREATE +#define IN_CREATE 0x00000100 /* Subfile was created */ +#define IN_MOVED_FROM 0x00000040 /* File was moved from X */ +#define IN_MOVED_TO 0x00000080 /* File was moved to Y */ +#define IN_DELETE 0x00000200 /* Subfile was deleted */ +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ +#endif /* IN_CREATE */ + +struct inotify_event { + int wd; + uint32_t mask; + uint32_t cookie; + uint32_t len; + char *name; +}; + +/* the following are legal, implemented events that user-space can watch for */ +#define IN_ACCESS 0x00000001 /* File was accessed */ +#define IN_MODIFY 0x00000002 /* File was modified */ +#define IN_ATTRIB 0x00000004 /* Metadata changed */ +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */ +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */ +#define IN_OPEN 0x00000020 /* File was opened */ +#define IN_MOVED_FROM 0x00000040 /* File was moved from X */ +#define IN_MOVED_TO 0x00000080 /* File was moved to Y */ +#define IN_CREATE 0x00000100 /* Subfile was created */ +#define IN_DELETE 0x00000200 /* Subfile was deleted */ +#define IN_DELETE_SELF 0x00000400 /* Self was deleted */ +#define IN_MOVE_SELF 0x00000800 /* Self was moved */ + +/* the following are legal events. they are sent as needed to any watch */ +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */ +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */ +#define IN_IGNORED 0x00008000 /* File was ignored */ + +/* helper events */ +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */ +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ + +/* special flags */ +#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */ +#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */ +#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */ +#define IN_ISDIR 0x40000000 /* event occurred against dir */ +#define IN_ONESHOT 0x80000000 /* only send event once */ + +/* + * All of the events - we build the list by hand so that we can add flags in + * the future and not break backward compatibility. Apps will get only the + * events that they originally wanted. Be sure to add new events here! + */ +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \ + IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \ + IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \ + IN_MOVE_SELF) + +#endif /* _INOTIFY_LOCAL_H_ */ + #define int8 char // number types #define int16 short @@ -52,7 +246,7 @@ #define wstrerror(err) strerror(WEXITSTATUS(err)) // get text status for child process -#define mutex pthread_mutex_t // abbreviations +#define mutex_tp pthread_mutex_t // abbreviations #define mutex_init pthread_mutex_init #define mutex_lock pthread_mutex_lock #define mutex_trylock pthread_mutex_trylock -@@ -495,7 +689,7 @@ +@@ -495,7 +689,7 @@ class Queue { - char wmi[8]; - Vxstring * vd; // vector of xstrings -- mutex qmutex; // for multi-thread access -+ mutex_tp qmutex; // for multi-thread access + char wmi[8]; + Vxstring * vd; // vector of xstrings +- mutex qmutex; // for multi-thread access ++ mutex_tp qmutex; // for multi-thread access int qcap; // queue capacity - int qcount; // curr. queue count - int ent1; // first entry pointer + int qcount; // curr. queue count + int ent1; // first entry pointer diff --git a/graphics/seam-carving-gui/Makefile b/graphics/seam-carving-gui/Makefile index cf6eec847f83..ac920f93f179 100644 --- a/graphics/seam-carving-gui/Makefile +++ b/graphics/seam-carving-gui/Makefile @@ -1,24 +1,25 @@ # Created by: buganini@gmail.com # $FreeBSD$ PORTNAME= seam-carving-gui PORTVERSION= 1.11 PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= GOOGLE_CODE DISTNAME= SeamCarvingGui-Src-${PORTVERSION} MAINTAINER= buganini@gmail.com COMMENT= The Seam Carving GUI is a GUI front end to CAIR -USES= gmake qmake +USES= dos2unix gmake qmake +DOS2UNIX_GLOB= *.cpp USE_QT4= gui imageformats_run moc_build uic_build WRKSRC= ${WRKDIR}/Src\ Seam\ Carving\ GUI\ ${PORTVERSION} PLIST_FILES= bin/SeamCarvingGui do-install: ${INSTALL_SCRIPT} ${WRKSRC}/SeamCarvingGui ${STAGEDIR}${PREFIX}/bin .include diff --git a/graphics/seam-carving-gui/files/patch-cair_CAIR.cpp b/graphics/seam-carving-gui/files/patch-cair_CAIR.cpp index 3c66e1a8ef49..9d6e31ba60dd 100644 --- a/graphics/seam-carving-gui/files/patch-cair_CAIR.cpp +++ b/graphics/seam-carving-gui/files/patch-cair_CAIR.cpp @@ -1,38 +1,38 @@ ---- cair/CAIR.cpp.orig 2010-02-28 16:44:47.000000000 +0800 -+++ cair/CAIR.cpp 2010-02-28 16:45:32.000000000 +0800 -@@ -276,7 +276,7 @@ - //Our thread function for the Grayscale - void * Gray_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - - while( true ) - { -@@ -437,7 +437,7 @@ - //The thread function, splitting the image into strips - void * Edge_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - - while( true ) - { -@@ -744,7 +744,7 @@ - //This works like Remove_Quadrant, strips across the image. - void * Add_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - Thread_Params add_area; - - while( true ) -@@ -907,7 +907,7 @@ - //the areas are not quadrants, rather, more like strips, but I keep the name convention - void * Remove_Quadrant( void * id ) - { -- int num = *((int *)id); -+ long int num = *((long int *)id); - Thread_Params remove_area; - - while( true ) +--- cair/CAIR.cpp.orig 2016-06-20 15:53:24 UTC ++++ cair/CAIR.cpp +@@ -276,7 +276,7 @@ inline CML_byte Grayscale_Pixel( CML_RGB + //Our thread function for the Grayscale + void * Gray_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + + while( true ) + { +@@ -437,7 +437,7 @@ int Convolve_Pixel( CML_image_ptr * Sour + //The thread function, splitting the image into strips + void * Edge_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + + while( true ) + { +@@ -744,7 +744,7 @@ CML_RGBA Average_Pixels( CML_RGBA Pixel1 + //This works like Remove_Quadrant, strips across the image. + void * Add_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + Thread_Params add_area; + + while( true ) +@@ -907,7 +907,7 @@ bool CAIR_Add( CML_image * Source, CML_i + //the areas are not quadrants, rather, more like strips, but I keep the name convention + void * Remove_Quadrant( void * id ) + { +- int num = *((int *)id); ++ long int num = *((long int *)id); + Thread_Params remove_area; + + while( true ) diff --git a/irc/psybnc/Makefile b/irc/psybnc/Makefile index fb7ca0d9ecd8..f58d571a6fe9 100644 --- a/irc/psybnc/Makefile +++ b/irc/psybnc/Makefile @@ -1,68 +1,70 @@ # Created by: Mina Naguib # $FreeBSD$ PORTNAME= psybnc DISTVERSION= 2.3.2-9 PORTREVISION= 2 CATEGORIES= irc ipv6 MASTER_SITES= http://www.psybnc.at/download/beta/ DISTNAME= psyBNC-${DISTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Powerful IRC bouncer LICENSE= GPLv1+ # though COPYING is GPLv2 BROKEN_powerpc64= Does not build USE_OPENSSL= yes +USES= dos2unix +DOS2UNIX_GLOB= *.c *.h WRKSRC= ${WRKDIR}/psybnc PSYBASE?= ${PREFIX}/psybnc MAKE_ARGS= PSYBASE=${PSYBASE} SUB_FILES= pkg-message SUB_LIST= PSYBASE=${PSYBASE} PLIST_SUB= PSYBASE=${PSYBASE:S,^${PREFIX}/,,} OPTIONS_DEFINE= MENUCONFIG MENUCONFIG_DESC=Configure using menu .include .if ${PORT_OPTIONS:MMENUCONFIG} IS_INTERACTIVE= yes .endif post-patch: @${REINPLACE_CMD} -e 's#=help/#=${PSYBASE}/help/#' ${WRKSRC}/lang/* .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000024 @${REINPLACE_CMD} -e 's,gcc,clang -Wno-return-type,g' ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's,gcc,clang -Wno-return-type,g' ${WRKSRC}/tools/autoconf.c .endif do-configure: .if ${PORT_OPTIONS:MMENUCONFIG} cd ${WRKSRC} && make menuconfig .else # Fool makefile.out into believing certs are unnecessary ${TOUCH} ${WRKSRC}/key/psybnc.cert.pem .endif do-install: ${INSTALL} -d ${STAGEDIR}${PSYBASE}/lang/ ${STAGEDIR}${PSYBASE}/key/ ${STAGEDIR}${PSYBASE}/help/ ${INSTALL_DATA} ${WRKSRC}/lang/INFO ${STAGEDIR}${PSYBASE}/lang/ ${INSTALL_DATA} ${WRKSRC}/lang/*.lng ${STAGEDIR}${PSYBASE}/lang/ ${INSTALL_DATA} ${WRKSRC}/src/ssl.cnf ${STAGEDIR}${PSYBASE}/key/ ${INSTALL_DATA} ${WRKSRC}/help/*.TXT ${STAGEDIR}${PSYBASE}/help/ ${INSTALL_DATA} ${WRKSRC}/help/*.DEU ${STAGEDIR}${PSYBASE}/help/ ${INSTALL_DATA} ${WRKSRC}/help/*.ITA ${STAGEDIR}${PSYBASE}/help/ ${INSTALL_PROGRAM} ${WRKSRC}/psybnc ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_DATA} ${WRKSRC}/psybnc.conf ${STAGEDIR}${PREFIX}/etc/psybnc.conf.sample post-install: if [ -f ${WRKSRC}/key/psybnc.req.pem ]; then \ ${INSTALL_DATA} ${WRKSRC}/key/psybnc.cert.pem ${STAGEDIR}${PSYBASE}/key/; \ ${INSTALL_DATA} ${WRKSRC}/key/psybnc.key.pem ${STAGEDIR}${PSYBASE}/key/; \ ${INSTALL_DATA} ${WRKSRC}/key/psybnc.req.pem ${STAGEDIR}${PSYBASE}/key/; \ fi .include diff --git a/irc/psybnc/files/patch-Makefile b/irc/psybnc/files/patch-Makefile index 85e3a71c6aed..013844412a81 100644 --- a/irc/psybnc/files/patch-Makefile +++ b/irc/psybnc/files/patch-Makefile @@ -1,29 +1,29 @@ ---- ./Makefile Sun Jul 7 18:09:25 2002 -+++ ../../psybnc.mina/Makefile Sun Nov 24 19:41:57 2002 -@@ -7,7 +7,7 @@ +--- Makefile.orig 2007-03-20 14:02:50 UTC ++++ Makefile +@@ -7,7 +7,7 @@ all: $(OBJS) @$(CC) tools/convconf.c -o tools/convconf @tools/convconf @echo [*] Running Autoconfig. - @$(CC) -I. tools/autoconf.c -o tools/autoconf + @$(CC) -I. tools/autoconf.c -o tools/autoconf -DPSYBASE=\"$(PSYBASE)\" -DPREFIX=\"$(PREFIX)\" @tools/autoconf @echo [*] Compiling MakeSalt for Encryption.. @$(CC) -I. -o makesalt tools/makesalt.c -@@ -23,7 +23,7 @@ +@@ -23,7 +23,7 @@ menuconfig: @$(CC) tools/convconf.c -o tools/convconf @tools/convconf @echo [*] Running Autoconfig. - @$(CC) -I. tools/autoconf.c -o tools/autoconf + @$(CC) -I. tools/autoconf.c -o tools/autoconf -DPSYBASE=\"$(PSYBASE)\" -DPREFIX=\"$(PREFIX)\" @tools/autoconf @echo [*] Creating Menu, please wait. @echo This needs the 'ncurses' library. If it is not available, menuconf wont work. If you are using 'curses', use make menuconfig-curses instead. -@@ -39,7 +39,7 @@ +@@ -39,7 +39,7 @@ menuconfig-curses: @$(CC) tools/convconf.c -o tools/convconf @tools/convconf @echo [*] Running Autoconfig. - @$(CC) -I. tools/autoconf.c -o tools/autoconf + @$(CC) -I. tools/autoconf.c -o tools/autoconf -DPSYBASE=\"$(PSYBASE)\" -DPREFIX=\"$(PREFIX)\" @tools/autoconf @echo [*] Creating Menu, please wait. @echo This needs the 'curses' library. If it is not available, menuconf wont work. diff --git a/irc/psybnc/files/patch-lang_english.lng b/irc/psybnc/files/patch-lang_english.lng index 67225e322250..48c65f706605 100644 --- a/irc/psybnc/files/patch-lang_english.lng +++ b/irc/psybnc/files/patch-lang_english.lng @@ -1,11 +1,11 @@ ---- ./lang/english.lng Sat Jun 1 18:07:47 2002 -+++ ../../psybnc.mina/lang/english.lng Sun Nov 24 19:14:01 2002 -@@ -1998,7 +1998,7 @@ +--- lang/english.lng.orig 2008-10-22 19:09:46 UTC ++++ lang/english.lng +@@ -1999,7 +1999,7 @@ msg0994=SYSTEM ; psybnc.c line 201: msg0995=PORT1 ; psybnc.c line 203: -msg0996=No Listenports/-hosts defined.ÿRun either 'make menuconfig' to setupÿor add:ÿPSYBNC.SYSTEM.PORT1=yourportÿandÿPSYBNC.SYSTEM.HOST1=*ÿto the psybnc.confÿ +msg0996=No Listenports/-hosts defined.ÿAdd:ÿPSYBNC.SYSTEM.PORT1=yourportÿandÿPSYBNC.SYSTEM.HOST1=*ÿto the psybnc.confÿ ; psybnc.c line 207: msg0997=SYSTEM ; psybnc.c line 212: diff --git a/irc/psybnc/files/patch-lang_german.lng b/irc/psybnc/files/patch-lang_german.lng index 8f19c8cb4808..ef291091da49 100644 --- a/irc/psybnc/files/patch-lang_german.lng +++ b/irc/psybnc/files/patch-lang_german.lng @@ -1,11 +1,11 @@ ---- ./lang/german.lng Sat Jun 1 18:08:01 2002 -+++ ../../psybnc.mina/lang/german.lng Sun Nov 24 19:14:22 2002 -@@ -2003,7 +2003,7 @@ +--- lang/german.lng.orig 2008-10-22 19:10:34 UTC ++++ lang/german.lng +@@ -2004,7 +2004,7 @@ msg0994=SYSTEM ; psybnc.c line 201: msg0995=PORT1 ; psybnc.c line 203: -msg0996=Keine Listen-Ports definiert.ÿStarte 'make menuconfig' ÿoder fuege:ÿPSYBNC.SYSTEM.PORT1=deinportÿundÿPSYBNC.SYSTEM.HOST1=*ÿzur psybnc.conf hinzuÿ +msg0996=Keine Listen-Ports definiert.ÿFuege:ÿPSYBNC.SYSTEM.PORT1=deinportÿundÿPSYBNC.SYSTEM.HOST1=*ÿzur psybnc.conf hinzuÿ ; psybnc.c line 207: msg0997=SYSTEM ; psybnc.c line 212: diff --git a/irc/psybnc/files/patch-lang_italiano.lng b/irc/psybnc/files/patch-lang_italiano.lng index 8b26de115606..e08978a9e5d2 100644 --- a/irc/psybnc/files/patch-lang_italiano.lng +++ b/irc/psybnc/files/patch-lang_italiano.lng @@ -1,11 +1,11 @@ ---- ./lang/italiano.lng Sat Jun 1 18:08:25 2002 -+++ ../../psybnc.mina/lang/italiano.lng Sun Nov 24 19:14:44 2002 -@@ -1998,7 +1998,7 @@ +--- lang/italiano.lng.orig 2008-10-22 19:10:54 UTC ++++ lang/italiano.lng +@@ -1999,7 +1999,7 @@ msg0994=SYSTEM ; psybnc.c line 201: msg0995=PORT1 ; psybnc.c line 203: -msg0996=Nessuna porta/host di listening definite.ÿEsegui 'make menuconfig' per il setupÿoppure aggiungi:ÿPSYBNC.SYSTEM.PORT1=tuaportaÿeÿPSYBNC.SYSTEM.HOST1=*ÿal file psybnc.confÿ +msg0996=Nessuna porta/host di listening definite.ÿAggiungi:ÿPSYBNC.SYSTEM.PORT1=tuaportaÿeÿPSYBNC.SYSTEM.HOST1=*ÿal file psybnc.confÿ ; psybnc.c line 207: msg0997=SYSTEM ; psybnc.c line 212: diff --git a/irc/psybnc/files/patch-src_match.c b/irc/psybnc/files/patch-src_match.c index 74e6063319ea..de4407673c75 100644 --- a/irc/psybnc/files/patch-src_match.c +++ b/irc/psybnc/files/patch-src_match.c @@ -1,11 +1,10 @@ -diff -Naurp src/match.c src/match.c ---- src/match.c 2007-02-26 12:26:10.000000000 +0000 -+++ src/match.c 2007-02-26 12:26:17.000000000 +0000 +--- src/match.c.orig 2016-06-20 14:41:27 UTC ++++ src/match.c @@ -36,6 +36,7 @@ /* Remove the next line to use this in IrcII */ #define EGGDROP +#include /* =================================================================== * Best to leave stuff after this point alone, but go on and change diff --git a/irc/psybnc/files/patch-src_p_blowfish.c b/irc/psybnc/files/patch-src_p__blowfish.c similarity index 89% rename from irc/psybnc/files/patch-src_p_blowfish.c rename to irc/psybnc/files/patch-src_p__blowfish.c index 1f56e326b397..610f3a2cd4c0 100644 --- a/irc/psybnc/files/patch-src_p_blowfish.c +++ b/irc/psybnc/files/patch-src_p__blowfish.c @@ -1,38 +1,38 @@ ---- src/p_blowfish.c 2005-06-04 22:22:45.000000000 +0400 -+++ src/p_blowfish.c 2008-02-25 23:42:07.000000000 +0300 +--- src/p_blowfish.c.orig 2016-06-20 14:41:27 UTC ++++ src/p_blowfish.c @@ -27,16 +27,21 @@ static char rcsid[] = "@(#)$Id: p_blowfish.c,v 1.3 2005/06/04 18:00:14 hisi Exp $"; #endif +#include +/* #include #include #include char *strmncpy(char *dest, char *source, size_t len); char *lngtxt(int msgnum); +*/ +/* #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) #define free(n) _pfree(n,__FILE__,__FUNCTION__,__LINE__) +*/ unsigned char *hashstring(unsigned char *str,int len); unsigned char *unhashstring(unsigned char *str); -@@ -478,10 +483,11 @@ +@@ -478,10 +483,11 @@ char * BLOWencrypt(unsigned char *str) char *p, *s, *dest, *d, *pt; char rim[5],ep[5],rep[5]; int i; - dest = (char *) pmalloc((strlen(str) + 9) * 2); + dest = __pmalloc((strlen(str) + 9) * 2, "p_blowfish.c", "BLOWencrypt", 481); + dest = pmalloc((strlen(str) + 9) * 2); *dest=0; /* pad fake string with 8 bytes to make sure there's enough */ - s = (char *) pmalloc(strlen(str) + 9); + s = pmalloc(strlen(str) + 9); strcpy(s, str); p = s; while (*p) diff --git a/irc/psybnc/files/patch-src_p_global.h b/irc/psybnc/files/patch-src_p__global.h similarity index 52% rename from irc/psybnc/files/patch-src_p_global.h rename to irc/psybnc/files/patch-src_p__global.h index 67a4f7e3f9f3..71b50ff458d8 100644 --- a/irc/psybnc/files/patch-src_p_global.h +++ b/irc/psybnc/files/patch-src_p__global.h @@ -1,36 +1,22 @@ ---- ./src/p_global.h Sun Jul 7 08:07:23 2002 -+++ ../../psybnc.mina/src/p_global.h Sun Nov 24 18:20:55 2002 -@@ -1264,8 +1264,8 @@ - #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } - #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) - --#define SSLCERT "key/psybnc.cert.pem" --#define SSLKEY "key/psybnc.key.pem" -+#define SSLCERT PSYBASE "/key/psybnc.cert.pem" -+#define SSLKEY PSYBASE "/key/psybnc.key.pem" - - #ifdef HAVE_SSL - #ifndef SSLSEC -diff -urN src/p_global.h psybnc.new/src/p_global.h ---- src/p_global.h 2005-06-04 22:22:45.000000000 +0400 -+++ src/p_global.h 2008-02-25 23:36:21.000000000 +0300 -@@ -972,7 +972,7 @@ +--- src/p_global.h.orig 2016-06-20 14:41:27 UTC ++++ src/p_global.h +@@ -972,7 +972,7 @@ int checklogging(int usern); #endif #ifndef P_MEMORY -unsigned long *__pmalloc(unsigned long size,char *module,char *function,int line); +char *__pmalloc(unsigned long size,char *module,char *function,int line); void _pfree(void * pointer,char *module, char *function, int line); struct usert *user(int usern); struct newpeert *newpeer(int usern); -@@ -1267,8 +1267,8 @@ +@@ -1267,8 +1267,8 @@ extern char * BLOW_stringdecrypt(unsigne #endif -#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } -#define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) +#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,(char*)__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } +#define pmalloc(n) __pmalloc((n),__FILE__,(char*)__FUNCTION__,(int)__LINE__) #define SSLCERT "key/psybnc.cert.pem" #define SSLKEY "key/psybnc.key.pem" diff --git a/irc/psybnc/files/patch-src_p_idea.c b/irc/psybnc/files/patch-src_p__idea.c similarity index 65% rename from irc/psybnc/files/patch-src_p_idea.c rename to irc/psybnc/files/patch-src_p__idea.c index fd271dbd5366..4191c9a44231 100644 --- a/irc/psybnc/files/patch-src_p_idea.c +++ b/irc/psybnc/files/patch-src_p__idea.c @@ -1,22 +1,21 @@ -diff -urN src/p_idea.c psybnc.new/src/p_idea.c ---- src/p_idea.c 2005-06-04 22:22:45.000000000 +0400 -+++ src/p_idea.c 2008-02-25 23:44:12.000000000 +0300 -@@ -50,6 +50,9 @@ +--- src/p_idea.c.orig 2016-06-20 14:41:27 UTC ++++ src/p_idea.c +@@ -50,6 +50,9 @@ static char rcsid[] = "@(#)$Id: p_idea.c * string encryption by psychoid */ + +#include +/* #include #include #include -@@ -62,7 +65,7 @@ +@@ -62,7 +65,7 @@ extern int cline; #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) - +*/ #ifdef CRYPT #define IDEAROUNDS 8 diff --git a/irc/psybnc/files/patch-src_p_memory.c b/irc/psybnc/files/patch-src_p__memory.c similarity index 79% rename from irc/psybnc/files/patch-src_p_memory.c rename to irc/psybnc/files/patch-src_p__memory.c index 092a5a73147a..3d29fb64f9c5 100644 --- a/irc/psybnc/files/patch-src_p_memory.c +++ b/irc/psybnc/files/patch-src_p__memory.c @@ -1,34 +1,34 @@ -diff -urN src/p_memory.c psybnc.new/src/p_memory.c ---- src/p_memory.c 2005-06-04 22:22:45.000000000 +0400 -+++ src/p_memory.c 2008-02-25 23:31:29.000000000 +0300 -@@ -32,10 +32,10 @@ +--- src/p_memory.c.orig 2016-06-20 14:41:27 UTC ++++ src/p_memory.c +@@ -32,10 +32,10 @@ FILE *logm=NULL; /* malloc-wrapper. No memory will log an error entry and kill the bouncer */ -unsigned long *__pmalloc(unsigned long size,char *module,char *function, int line) +char *__pmalloc(unsigned long size,char *module,char *function, int line) { - unsigned long *rc; - if (!(rc=(unsigned long *)malloc(size))) + char *rc; + if (!(rc=(char *)malloc(size))) { p_log(LOG_ERROR,-1,lngtxt(602),module,function,line); exit(0x0); -@@ -53,7 +53,7 @@ +@@ -53,7 +53,7 @@ unsigned long *__pmalloc(unsigned long s return rc; } -void _pfree(unsigned long *pointer, char *module, char *function, int line) +void _pfree(char *pointer, char *module, char *function, int line) { #ifdef LOGALLOC if(logm==NULL) -@@ -67,7 +67,7 @@ +@@ -67,7 +67,7 @@ void _pfree(unsigned long *pointer, char free(pointer); } -#define free(a) _pfree((void *)a,__FILE__,__FUNCTION__,__LINE__) +#define free(a) _pfree((void *)a,__FILE__,(char*)__FUNCTION__,__LINE__) /* struct wrappers. Those alloc, delete and return the needed structures */ + diff --git a/irc/psybnc/files/patch-src_p_string.c b/irc/psybnc/files/patch-src_p__string.c similarity index 63% rename from irc/psybnc/files/patch-src_p_string.c rename to irc/psybnc/files/patch-src_p__string.c index 94851f48e29a..deaa2623baa7 100644 --- a/irc/psybnc/files/patch-src_p_string.c +++ b/irc/psybnc/files/patch-src_p__string.c @@ -1,12 +1,11 @@ - #ifndef SSLSEC ---- ./src/p_string.c Fri Jul 19 09:01:52 2002 -+++ ../../psybnc.mina/src/p_string.c Sun Nov 24 17:58:56 2002 -@@ -613,7 +613,7 @@ +--- src/p_string.c.orig 2016-06-20 14:41:27 UTC ++++ src/p_string.c +@@ -616,7 +616,7 @@ int loadlanguage(char *langf) int msg; pcontext; clearlanguage(); - ap_snprintf(lfname,sizeof(lfname),"lang/%s.lng",langf); + ap_snprintf(lfname,sizeof(lfname),"%s/lang/%s.lng",PSYBASE, langf); maxindex=0; langname[0]=0; lfile=fopen(lfname,"r"); diff --git a/irc/psybnc/files/patch-src_psybnc.c b/irc/psybnc/files/patch-src_psybnc.c index 07c3209c5d86..a4c2ef801b3d 100644 --- a/irc/psybnc/files/patch-src_psybnc.c +++ b/irc/psybnc/files/patch-src_psybnc.c @@ -1,47 +1,47 @@ ---- ./src/psybnc.c Wed Jul 24 17:19:05 2002 -+++ ../../psybnc.mina/src/psybnc.c Sun Nov 24 19:54:52 2002 -@@ -43,6 +43,8 @@ +--- src/psybnc.c.orig 2016-06-20 14:41:27 UTC ++++ src/psybnc.c +@@ -44,6 +44,8 @@ int slice=0; #ifdef HAVE_SSL +int fexists(char *fname); + void initSSL() { SSL_load_error_strings(); -@@ -170,13 +172,17 @@ +@@ -171,13 +173,17 @@ main (int argc, char **argv) if(argc==2) { strmncpy(configfile,argv[1],sizeof(configfile)); - } else { + } else if (fexists("psybnc.conf")) { + strcpy(configfile, "psybnc.conf"); + } else if (fexists(PREFIX "/etc/psybnc.conf")) { strcpy(configfile,"psybnc.conf"); /* rcsid */ + } else { + strcpy(configfile, "psybnc.conf"); } conffile=fopen(configfile,"r"); if(conffile==NULL) { - printf("Configuration File %s not found, aborting\nRun 'make menuconfig' for creating a configuration or create the file manually.\n",conffile); /* rcsid */ + printf("Configuration file psybnc.conf not found in current directory or in " PREFIX "/etc/psybnc.conf.\n Copy " PREFIX "/etc/psybnc.conf.sample to the current directory as psybnc.conf :\n cp " PREFIX "/etc/psybnc.conf.sample psybnc.conf\n\nOR create the file manually.\n"); /* rcsid */ exit (0x0); } fclose(conffile); -@@ -301,3 +307,15 @@ +@@ -302,3 +308,15 @@ main (int argc, char **argv) bncmain(); - } + } +int fexists(char *fname) +{ + FILE *fn; + int rc=0; + fn=fopen(fname,"r"); + if(fn!=NULL) + { + fclose(fn); + rc=1; + } + return rc; +} diff --git a/irc/psybnc/files/patch-tools_autoconf.c b/irc/psybnc/files/patch-tools_autoconf.c index 9e281d82e0ef..bbb25ca3c206 100644 --- a/irc/psybnc/files/patch-tools_autoconf.c +++ b/irc/psybnc/files/patch-tools_autoconf.c @@ -1,24 +1,24 @@ ---- tools/autoconf.c.orig 2006-11-16 00:27:04.000000000 +0000 -+++ tools/autoconf.c 2013-01-18 13:55:10.102047624 +0000 -@@ -443,9 +443,9 @@ +--- tools/autoconf.c.orig 2016-06-20 14:41:27 UTC ++++ tools/autoconf.c +@@ -443,9 +443,9 @@ int main() fprintf(makefile,"INCLUDE = -I./src/ -I.\n"); fprintf(makefile,"OBJS = src/psybnc.o src/match.o src/p_client.o src/p_crypt.o src/p_dcc.o src/p_hash.o src/p_idea.o src/p_inifunc.o src/p_link.o src/p_log.o src/p_memory.o src/p_network.o src/p_parse.o src/p_peer.o src/p_server.o src/p_socket.o src/p_string.o src/p_sysmsg.o src/p_userfile.o src/p_uchannel.o src/p_script.o src/p_topology.o src/p_intnet.o src/p_blowfish.o src/p_translate.o src/p_coredns.o src/snprintf.o %s\n",env); if(provi==0) - fprintf(makefile,"DEFINE = -DHAVE_CONFIG %s%s%s%s%s%s\n",sunosopt,bigopt,ipv6opt,timeopt,sslopt,dnsopt); + fprintf(makefile,"DEFINE = -DHAVE_CONFIG %s%s%s%s%s%s -DPSYBASE=\\\"%s\\\" -DPREFIX=\\\"%s\\\"\n",sunosopt,bigopt,ipv6opt,timeopt,sslopt,dnsopt, PSYBASE, PREFIX); else - fprintf(makefile,"DEFINE = -DHAVE_PROV_CONFIG %s%s%s%s%s%s\n",sunosopt,bigopt,ipv6opt,timeopt,sslopt,dnsopt); + fprintf(makefile,"DEFINE = -DHAVE_PROV_CONFIG %s%s%s%s%s%s -DPSYBASE=\\\"%s\\\" -DPREFIX=\\\"%s\\\"\n",sunosopt,bigopt,ipv6opt,timeopt,sslopt,dnsopt, PSYBASE, PREFIX); fprintf(makefile,"TARGET = psybnc\n"); fprintf(makefile,"\n"); fprintf(makefile,"all: $(OBJS)\n"); -@@ -453,7 +453,8 @@ +@@ -453,7 +453,8 @@ int main() fprintf(makefile," @strip $(TARGET)\n"); if(ssl==0) { - if(!fexists("key/psybnc.cert.pem")) /* only create, if not exist */ + if(!fexists(PSYBASE "/key/psybnc.cert.pem") && + !fexists("key/psybnc.cert.pem")) /* only create, if not exist */ { mkdir("key",0700); fprintf(makefile," @echo \"*** GENERATING SSL-KEYS FROM CERTIFICATE **\"\n"); diff --git a/java/jakarta-commons-pool/Makefile b/java/jakarta-commons-pool/Makefile index 1dabad7964da..badb32bfbf49 100644 --- a/java/jakarta-commons-pool/Makefile +++ b/java/jakarta-commons-pool/Makefile @@ -1,47 +1,49 @@ # Created by: Anton Yudin # $FreeBSD$ PORTNAME= commons-pool PORTVERSION= 1.6 CATEGORIES= java devel MASTER_SITES= APACHE_COMMONS_SOURCE PKGNAMEPREFIX= jakarta- DISTNAME= ${PORTNAME}-${PORTVERSION}-src MAINTAINER= ale@FreeBSD.org COMMENT= Jakarta Object-pooling API LICENSE= APACHE20 OPTIONS_DEFINE= DOCS +USES= dos2unix +DOS2UNIX_GLOB= *.xml *.java USE_JAVA= yes JAVA_VERSION= 1.6+ USE_ANT= yes ALL_TARGET= build-jar -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar PORTDOCS= * .include .if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc .endif do-install: @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..." @${INSTALL_DATA} ${WRKSRC}/dist/${PORTNAME}-${PORTVERSION}.jar \ ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar @${ECHO_MSG} " [ DONE ]" .if ${PORT_OPTIONS:MDOCS} @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." @${MKDIR} ${STAGEDIR}${DOCSDIR} @cd ${WRKSRC}/dist/docs && ${FIND} api \ | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR} > /dev/null 2>&1 @${ECHO_MSG} " [ DONE ]" .endif .include diff --git a/java/jakarta-commons-pool/files/patch-build.xml b/java/jakarta-commons-pool/files/patch-build.xml index d82eb5bb0f09..bb1ff678dfc1 100644 --- a/java/jakarta-commons-pool/files/patch-build.xml +++ b/java/jakarta-commons-pool/files/patch-build.xml @@ -1,11 +1,11 @@ ---- build.xml.orig 2012-01-10 13:14:30.000000000 +0100 -+++ build.xml 2012-01-10 13:14:40.000000000 +0100 +--- build.xml.orig 2016-06-20 15:05:02 UTC ++++ build.xml @@ -40,7 +40,7 @@ - - - -- -+ - - - + + + +- ++ + + + diff --git a/java/jgrapht/Makefile b/java/jgrapht/Makefile index 947fc6d446c8..a7f194798f98 100644 --- a/java/jgrapht/Makefile +++ b/java/jgrapht/Makefile @@ -1,60 +1,61 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= jgrapht PORTVERSION= 0.7.3 PORTREVISION= 1 CATEGORIES= java math MASTER_SITES= SF/${PORTNAME}/JGraphT/Version%20${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Java package for mathematical graph-theory objects and algorithms -USES= zip +USES= dos2unix zip +DOS2UNIX_GLOB= *.xml *.java USE_JAVA= yes JAVA_VERSION= 1.6 1.7 OPTIONS_DEFINE= DOCS .include .if !defined(WITHOUT_COMPILE) USE_ANT= yes ALL_TARGET= jar .if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc .endif .else NO_BUILD= yes .endif PORTDOCS= * -PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar +PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar .include JAVA_PORT_API= ${LOCALBASE}/share/doc/jdk${JAVA_PORT_VERSION:C/([0-9]\.[0-9])\.[0-9]/\1/}/api .if exists(${JAVA_PORT_API}) MAKE_ARGS+= -Djdk.api="${JAVA_PORT_API}" .endif pre-fetch: @${ECHO_MSG} "" @${ECHO_MSG} "You may use the following build options:" @${ECHO_MSG} "" @${ECHO_MSG} " WITHOUT_COMPILE=yes Install the pre-compiled .jar file" @${ECHO_MSG} "" do-install: @${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..." @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-jdk1.5.jar ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar @${ECHO_MSG} " [DONE]" .if ${PORT_OPTIONS:MDOCS} @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." @cd ${WRKSRC}/javadoc && ${FIND} . -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; @cd ${WRKSRC}/javadoc && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \; @${ECHO_MSG} " [DONE]" .endif .include diff --git a/java/jgrapht/files/patch-build.xml b/java/jgrapht/files/patch-build.xml index eb39cf5aabd2..2870d1748c70 100644 --- a/java/jgrapht/files/patch-build.xml +++ b/java/jgrapht/files/patch-build.xml @@ -1,12 +1,12 @@ Patch to allow the JDK API location to be passed to Ant using -Djdk.api ---- build.xml.orig Mon Jul 3 00:53:38 2006 -+++ build.xml Sun Mar 11 12:16:31 2007 -@@ -400,6 +400,7 @@ - - - -+ - - - +--- build.xml.orig 2016-06-20 15:06:43 UTC ++++ build.xml +@@ -355,6 +355,7 @@ + + + ++ + + + diff --git a/mail/vpopmail/Makefile b/mail/vpopmail/Makefile index 6b9a83999788..ae3c4cc6ed7d 100644 --- a/mail/vpopmail/Makefile +++ b/mail/vpopmail/Makefile @@ -1,423 +1,424 @@ # Created by: Neil Blakey-Milner # $FreeBSD$ PORTNAME= vpopmail PORTVERSION= 5.4.33 PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-stable/${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Easy virtual domain and authentication package for use with qmail LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual BUILD_DEPENDS= ${LOCALBASE}/bin/tcprules:sysutils/ucspi-tcp RUN_DEPENDS= ${LOCALBASE}/bin/tcprules:sysutils/ucspi-tcp PATCH_STRIP= -p1 -USES= qmail gmake fakeroot +USES= dos2unix qmail gmake fakeroot +DOS2UNIX_FILES= doc/README.vpopmaild CONFLICTS= vpopmail-devel-5.* GNU_CONFIGURE= YES OPTIONS_SUB= yes USERS= vpopmail GROUPS= vchkpw VCFGDIR?= ${WRKDIR}/vcfg VCFGFILES?= inc_deps lib_deps tcp.smtp CONFIGURE_ENV+= VCFGDIR="${VCFGDIR}" \ AUTOCONF=true ACLOCAL=true AUTOMAKE=true AUTOHEADER=true CONFIGURE_ARGS= --enable-qmaildir=${QMAIL_PREFIX} \ --enable-tcprules-prog=${LOCALBASE}/bin/tcprules \ --enable-tcpserver-file=${VPOPMAIL_DIR}/etc/tcp.smtp \ --enable-non-root-build \ --enable-logging=${LOGLEVEL} \ --enable-vpopuser=nobody \ --enable-vpopgroup=nobody OPTIONS_DEFINE= DOCS \ PASSWD \ MD5_PASSWORDS \ CLEAR_PASSWD \ LEARN_PASSWORDS \ MYSQL_REPLICATION \ MYSQL_LIMITS \ VALIAS \ ROAMING \ IP_ALIAS \ QMAIL_EXT \ FILE_LOCKING \ FILE_SYNC \ USERS_BIG_DIR \ SEEKABLE \ SPAMASSASSIN \ SUID_VCHKPW \ SMTP_AUTH_PATCH \ ONCHANGE_SCRIPT \ FPIC \ MAILDROP \ DOMAIN_QUOTAS \ SPAMFOLDER \ SINGLE_DOMAIN \ AUTH_LOG \ SQL_LOG \ SQL_LOG_TRIM OPTIONS_SINGLE= AUTH OPTIONS_SINGLE_AUTH= CDB MYSQL PGSQL LDAP LDAP_SASL ORACLE SYBASE OPTIONS_DEFAULT=MD5_PASSWORDS \ CDB \ ROAMING \ FILE_LOCKING \ USERS_BIG_DIR \ SEEKABLE \ FPIC \ AUTH_LOG CDB_DESC= Auth via CDB PASSWD_DESC= /etc/passwd account support MYSQL_DESC= Auth via MySQL PGSQL_DESC= Auth via PostgreSQL SYBASE_DESC= Auth via Sybase MD5_PASSWORDS_DESC= Store passwords in MD5 format CLEAR_PASSWD_DESC= Store passwords in plaintext LEARN_PASSWORDS_DESC= Learn passwords during POP auth MYSQL_REPLICATION_DESC= MySQL database replication support MYSQL_LIMITS_DESC= MySQL mailbox limitations support ORACLE_DESC= Auth via Oracle LDAP_DESC= Auth via LDAP LDAP_SASL_DESC= Auth via LDAP SASL VALIAS_DESC= Store aliases in DB instead of .qmail files ROAMING_DESC= roaming users support IP_ALIAS_DESC= IP alias support QMAIL_EXT_DESC= qmail-like user-* address support FILE_LOCKING_DESC= file locking support FILE_SYNC_DESC= fsync support (decreases performance) USERS_BIG_DIR_DESC= Hashing user directories (BIGDIR) SEEKABLE_DESC= Make input to vdelivermail seekable SPAMASSASSIN_DESC= SpamAssassin support SUID_VCHKPW_DESC= Set vchkpw setugid vpopmail:vchkpw SMTP_AUTH_PATCH_DESC= Swap Challenge/Response for CRAM-MD5 ONCHANGE_SCRIPT_DESC= vpopmail/etc/onchange script support FPIC_DESC= Compile with -fPIC MAILDROP_DESC= Maildrop MDA support DOMAIN_QUOTAS_DESC= Domain quotas support SPAMFOLDER_DESC= Move spam to Junk (requires SA) SINGLE_DOMAIN_DESC= Optimize for a single domain setup AUTH_LOG_DESC= Log auth attempts when using a DB SQL_LOG_DESC= Log to selected SQL database SQL_LOG_TRIM_DESC= Trim logs of deleted users/domains # Compatibility with older KNOB, correctly will enable if set, # but be unset if unselected in the 'config' dialog .if defined(WITH_POSTGRESQL) PORT_OPTIONS+= PGSQL .endif .if defined(WITH_MYSQL_LOG) PORT_OPTIONS+= SQL_LOG .endif .if defined(WITH_PGSQL_LOG) PORT_OPTIONS+= SQL_LOG .endif .if defined(WITH_SQL_LOG_REMOVE_DELETED) PORT_OPTIONS+= SQL_LOG_TRIM .endif DOMAIN_QUOTAS_CONFIGURE_ON= --enable-domainquotas=y DOMAIN_QUOTAS_CONFIGURE_OFF= --enable-domainquotas=n PASSWD_CONFIGURE_ON= --enable-passwd MD5_PASSWORDS_CONFIGURE_OFF= --disable-md5-passwords VALIAS_CONFIGURE_ON= --enable-valias CLEAR_PASSWD_CONFIGURE_OFF= --disable-clear-passwd LEARN_PASSWORDS_CONFIGURE_ON= --enable-learn-passwords LDAP_CONFIGURE_ON= --enable-auth-module=ldap ORACLE_CONFIGURE_ON= --enable-auth-module=oracle SYBASE_CONFIGURE_ON= --enable-auth-module=sybase SINGLE_DOMAIN_CONFIGURE_ON= --disable-many-domains IP_ALIAS_CONFIGURE_ON= --enable-ip-alias-domains QMAIL_EXT_CONFIGURE_ON= --enable-qmail-ext FILE_LOCKING_CONFIGURE_OFF= --disable-file-locking FILE_SYNC_CONFIGURE_ON= --enable-file-sync AUTH_LOG_CONFIGURE_OFF= --disable-auth-logging USERS_BIG_DIR_CONFIGURE_OFF= --disable-users-big-dir SEEKABLE_CONFIGURE_OFF= --disable-make-seekable ROAMING_CONFIGURE_ON= --enable-roaming-users \ --enable-relay-clear-minutes=${RELAYCLEAR} MYSQL_CONFIGURE_ON= --enable-auth-module=mysql \ --enable-incdir=${LOCALBASE}/include/mysql \ --enable-libdir=${LOCALBASE}/lib/mysql MYSQL_REPLICATION_CONFIGURE_ON= --enable-mysql-replication MYSQL_LIMITS_CONFIGURE_ON= --enable-mysql-limits PGSQL_CONFIGURE_ON= --enable-auth-module=pgsql SQL_LOG_CONFIGURE_ON= --enable-sql-logging ONCHANGE_SCRIPT_CONFIGURE_ON= --enable-onchange-script MAILDROP_CONFIGURE_ON= --enable-maildrop=y \ --enable-maildrop-prog=${LOCALBASE}/bin/maildrop MAILDROP_CONFIGURE_OFF= --enable-maildrop=n MAILDROP_RUN_DEPENDS= maildrop:${MAILDROP_PORT} MAILDROP_BUILD_DEPENDS= maildrop:${MAILDROP_PORT} SPAMASSASSIN_CONFIGURE_ON= --enable-spamassassin \ --enable-spamc-prog=${LOCALBASE}/bin/spamc \ --enable-spam-threshold=${SPAM_THRESHOLD} SPAMASSASSIN_BUILD_DEPENDS= spamc:mail/spamassassin SPAMASSASSIN_RUN_DEPENDS= spamc:mail/spamassassin SPAMFOLDER_CONFIGURE_ON= --enable-spam-junkfolder INSTALL_TARGET= install-strip .include .if ${PORT_OPTIONS:MSUID_VCHKPW} VCHKPW_MODE="6711" .endif PLIST_SUB+= VCHKPW_MODE="${VCHKPW_MODE}" # PostgreSQL database configuration options # # WITH_PGSQL_USER - the username for connecting to the PostgreSQL server (postgres) # WITH_PGSQL_DB - the name of the PostgreSQL database to use (vpopmail) # # Oracle database configuration options # # WARNING: This is NOT TESTED, not in the least. # Please report any success or failure to the port maintainer # # WITH_ORACLE_PROC - the name of the Oracle Pro-C precompiler, default 'proc' # WITH_ORACLE_SERVICE - the Oracle service name (jimmy) # WITH_ORACLE_USER - the username for connecting to the Oracle server (system) # WITH_ORACLE_PASSWD - the password for connecting to the Oracle server (manager) # WITH_ORACLE_DB - the name of the Oracle database to connect to (orcl1) # WITH_ORACLE_HOME - the Oracle installation directory (/export/home/oracle) # # Sybase database configuration options # # WARNING: This is NOT TESTED, not in the least. # Please report any success or failure to the port maintainer # # WITH_SYBASE_SERVER - the Sybase server name (empty) # WITH_SYBASE_USER - the username for connecting to the Sybase server (sa) # WITH_SYBASE_PASSWD - the password for connecting to the Sybase server (empty) # WITH_SYBASE_APP - the app for connecting to the Sybase server (vpopmail) # WITH_SYBASE_DB - the name of the Sybase database to connect to (vpopmail) # # Courier IMAP configuration options for authvchkpw # # WARNING: This is NOT TESTED, not in the least. # Please report any success or failure to the port maintainer # # WITH_COURIER_IMAPLOGIN - the path to the imaplogin program # WITH_COURIER_IMAPD - the path to the imapd program # User-configurable variables # # ONCHANGE_SCRIPT - see README.onchange # MAILDROP - see README.maildrop # # Define these to change from the default behaviour # # MAILDROP_PORT - the port that provides the bin/maildrop program # # Set these to the values you'd prefer # # RELAYCLEAR - time in minutes before clearing relay hole (requires roaming) # SPAM_THRESHOLD - minimum score required to delete spam messages (requires spamassassin) # LOGLEVEL - n - no logging, y - log all, # e - log errors, p - log passwords in errors, # v - verbose success and errors with passwords # QMAIL_PREFIX - location of qmail directory # VPOPMAIL_DIR - installation area for vpopmail (see comment below) # # RELAYCLEAR?= 30 SPAM_THRESHOLD?=15 LOGLEVEL?= y MAILDROP_PORT?= mail/maildrop WITH_COURIER_IMAPLOGIN?= ${LOCALBASE}/sbin/imaplogin WITH_VPOPMAIL_AUTHVCHKPW?= ${VPOPMAIL_DIR}/bin/authvchkpw WITH_COURIER_IMAPD?= ${LOCALBASE}/bin/imapd WITH_ORACLE_PROC?= proc VPOPMAIL_DIR?= ${PREFIX}/vpopmail # Uncomment this, or set PREFIX to /home if you have an existing # vpopmail install with the vpopmail users' home directory set to # /home/vpopmail - package rules dictate we default to LOCALBASE/vpopmail # #PREFIX?= /home # End of user-configurable variables .if ${PORT_OPTIONS:MLDAP} USE_OPENLDAP= yes .if ${PORT_OPTIONS:MLDAP_SASL} WANT_OPENLDAP_SASL= yes .endif LDAP_FILES= ${WRKSRC}/doc/README.ldap \ ${WRKSRC}/ldap/nsswitch.conf \ ${WRKSRC}/ldap/pam_ldap.conf \ ${WRKSRC}/ldap/pam_ldap.secret \ ${WRKSRC}/ldap/qmailUser.schema \ ${WRKSRC}/ldap/slapd.conf \ ${WRKSRC}/ldap/vpopmail.ldif .endif .if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes .if defined(WITH_MYSQL_USER) || defined(WITH_MYSQL_READ_USER) || defined(WITH_MYSQL_UPDATE_USER) BROKEN_MYSQL_PARAMS= true .endif .if defined(WITH_MYSQL_SERVER) || defined(WITH_MYSQL_READ_SERVER) || defined(WITH_MYSQL_UPDATE_SERVER) BROKEN_MYSQL_PARAMS= true .endif .if defined(WITH_MYSQL_PASSWD) || defined(WITH_MYSQL_READ_PASSWD) || defined(WITH_MYSQL_UPDATE_PASSWD) BROKEN_MYSQL_PARAMS= true .endif .if defined(WITH_MYSQL_DB) BROKEN_MYSQL_PARAMS= true .endif .if defined(BROKEN_MYSQL_PARAMS) BROKEN= The MySQL connection parameters are no longer setup at compile time - please edit the ${VPOPMAIL_DIR}/etc/vpopmail.mysql file instead .endif .endif .if defined(DEFAULT_DOMAIN) BROKEN= The default vpopmail domain is no longer setup at compile time - please edit the ${VPOPMAIL_DIR}/etc/defaultdomain file instead .endif .if defined(WITH_APOP) BROKEN= The WITH_APOP option is deprecated; set WITH_CLEAR_PASSWD instead, APOP will just work .endif .if ${PORT_OPTIONS:MPGSQL} USES= pgsql .endif .if ${PORT_OPTIONS:MSQL_LOG_TRIM} EXTRA_PATCHES+= ${FILESDIR}/sql-remove-deleted.patch .endif .if ${PORT_OPTIONS:MSMTP_AUTH_PATCH} EXTRA_PATCHES+= ${FILESDIR}/vchkpw-smtp-auth.patch .endif .if ${PORT_OPTIONS:MMAILDROP} MAILDROP_FILES= ${WRKSRC}/maildrop/maildroprc.v1 \ ${WRKSRC}/maildrop/maildroprc.v2 .endif .if empty(PORT_OPTIONS:MDOCS) EXTRA_PATCHES+= ${FILESDIR}/Makefile.in-noportdocs.patch .endif .if ${PORT_OPTIONS:MFPIC} && ( ${ARCH} == "amd64" || ${ARCH} == "ia64" ) CFLAGS+= -fPIC .endif # # Some suggestions from Gabriel Ambuehl # # DOCS= README README.activedirectory README.filelocking \ README.ipaliasdomains README.ldap README.maildrop \ README.mysql \ README.onchange README.oracle README.pgsql \ README.qmail-default README.quotas \ README.roamingusers README.spamassassin README.sybase \ README.vdelivermail README.vlimits \ README.vpopmaild README.vpopmaild README.vqmaillocal \ UPGRADE # # This port doesn't honour PREFIX, it honours vpopmail's home directory. # Since we create vpopmail if it doesn't exist, we set it so that it # does honour PREFIX. -- nbm # pre-configure: ${AWK} -F: '/^${USERS}:/ { print $$3 }' ${UID_FILES} > ${WRKSRC}/vpopmail.uid ${AWK} -F: '/^${USERS}:/ { sub(/\/usr\/local/, "${PREFIX}", $$9); print $$9 }' ${UID_FILES} > ${WRKSRC}/vpopmail.dir ${AWK} -F: '/^${GROUPS}:/ { print $$3 }' ${GID_FILES} > ${WRKSRC}/vpopmail.gid .if ${PORT_OPTIONS:MPGSQL} .if defined(WITH_PGSQL_DB) ${REINPLACE_CMD} -E -e "s/(#define DB.*)vpopmail(.*)/\1${WITH_PGSQL_DB}\2/" ${WRKSRC}/vpgsql.h .endif .if defined(WITH_PGSQL_USER) ${REINPLACE_CMD} -E -e "s/(#define PG_CONNECT.*)postgres(.*)/\1${WITH_PGSQL_USER}\2/" ${WRKSRC}/vpgsql.h .endif .endif .if ${PORT_OPTIONS:MORACLE} .if defined(WITH_ORACLE_SERVICE) ${REINPLACE_CMD} -E -e "s/(#define ORACLE_SERVICE.*)jimmy(.*)/\1${WITH_ORACLE_SERVICE}\2/" ${WRKSRC}/voracle.h .endif .if defined(WITH_ORACLE_USER) ${REINPLACE_CMD} -E -e "s/(#define ORACLE_USER.*)system(.*)/\1${WITH_ORACLE_USER}\2/" ${WRKSRC}/voracle.h .endif .if defined(WITH_ORACLE_PASSWD) ${REINPLACE_CMD} -E -e "s/(#define ORACLE_PASSWD.*)manager(.*)/\1${WITH_ORACLE_PASSWD}\2/" ${WRKSRC}/voracle.h .endif .if defined(WITH_ORACLE_HOME) ${REINPLACE_CMD} -E -e "s@(#define ORACLE_HOME.*)/export/home/oracle(.*)@\1${WITH_ORACLE_HOME}\2@" ${WRKSRC}/voracle.h .endif .if defined(WITH_ORACLE_DB) ${REINPLACE_CMD} -E -e "s/(#define ORACLE_DATABASE.*)orcl1(.*)/\1${WITH_ORACLE_DB}\2/" ${WRKSRC}/voracle.h .endif cd ${WRKSRC} && ${WITH_ORACLE_PROC} voracle.pc .endif .if ${PORT_OPTIONS:MSYBASE} .if defined(WITH_SYBASE_SERVER) ${REINPLACE_CMD} -E -e "s/(#define SYBASE_SERVER.*)\"\"(.*)/\1\"${WITH_SYBASE_SERVER}\"\2/" ${WRKSRC}/vsybase.h .endif .if defined(WITH_SYBASE_USER) ${REINPLACE_CMD} -E -e "s/(#define SYBASE_USER.*)sa(.*)/\1${WITH_SYBASE_USER}\2/" ${WRKSRC}/vsybase.h .endif .if defined(WITH_SYBASE_PASSWD) ${REINPLACE_CMD} -E -e "s/(#define SYBASE_PASSWD.*)\"\"(.*)/\1\"${WITH_SYBASE_PASSWD}\"\2/" ${WRKSRC}/vsybase.h .endif .if defined(WITH_SYBASE_APP) ${REINPLACE_CMD} -E -e "s@(#define SYBASE_APP.*)vpopmail(.*)@\1${WITH_SYBASE_APP}\2@" ${WRKSRC}/vsybase.h .endif .if defined(WITH_SYBASE_DB) ${REINPLACE_CMD} -E -e "s/(#define SYBASE_DATABASE.*)vpopmail(.*)/\1${WITH_SYBASE_DB}\2/" ${WRKSRC}/vsybase.h .endif .endif ${REINPLACE_CMD} -E -e "s@(#define PATH_IMAPLOGIN.*)VPOPMAILDIR.*@\1\"${WITH_COURIER_IMAPLOGIN}\"@" ${WRKSRC}/authvchkpw.c ${REINPLACE_CMD} -E -e "s@(#define PATH_AUTHVCHKPW.*)VPOPMAILDIR.*@\1\"${WITH_VPOPMAIL_AUTHVCHKPW}\"@" ${WRKSRC}/authvchkpw.c ${REINPLACE_CMD} -E -e "s@(#define PATH_IMAPD.*)VPOPMAILDIR.*@\1\"${WITH_COURIER_IMAPD}\"@" ${WRKSRC}/authvchkpw.c ${MKDIR} ${VCFGDIR} post-install: ${MKDIR} ${STAGEDIR}${VPOPMAIL_DIR}/etc if [ -e "${VCFGDIR}/tcp.smtp" ]; then \ ${INSTALL_DATA} ${VCFGDIR}/tcp.smtp ${STAGEDIR}${VPOPMAIL_DIR}/etc/tcp.smtp-dist; \ else \ ${TOUCH} ${STAGEDIR}${VPOPMAIL_DIR}/etc/tcp.smtp-dist; \ fi; .if ${PORT_OPTIONS:MLDAP} @${ECHO_CMD} "# LDAP CONNECTION SETTINGS FOR VPOPMAIL" > ${STAGEDIR}${VPOPMAIL_DIR}/etc/vpopmail.ldap-dist @${ECHO_CMD} "# Line format:" >> ${STAGEDIR}${VPOPMAIL_DIR}/etc/vpopmail.ldap-dist @${ECHO_CMD} "# host|port|user|password|basedn" >> ${STAGEDIR}${VPOPMAIL_DIR}/etc/vpopmail.ldap-dist @${ECHO_CMD} "localhost|389|cn=vpopmailuser, o=vpopmail|vpoppasswd|o=vpopmail" >> ${STAGEDIR}${VPOPMAIL_DIR}/etc/vpopmail.ldap-dist .endif .if ${PORT_OPTIONS:MLDAP} ${MKDIR} ${STAGEDIR}${VPOPMAIL_DIR}/ldap ${INSTALL_DATA} ${LDAP_FILES} ${STAGEDIR}${VPOPMAIL_DIR}/ldap .endif .if ${PORT_OPTIONS:MMAILDROP} ${MKDIR} ${STAGEDIR}${VPOPMAIL_DIR}/maildrop ${INSTALL_DATA} ${MAILDROP_FILES} ${STAGEDIR}${VPOPMAIL_DIR}/maildrop .endif .if ${PORT_OPTIONS:MDOCS} ${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${VPOPMAIL_DIR}/doc/ .endif .include diff --git a/mail/vpopmail/files/patch-README.vpopmaild b/mail/vpopmail/files/patch-README.vpopmaild index 8a31b72f2ebe..6f2a13798446 100644 --- a/mail/vpopmail/files/patch-README.vpopmaild +++ b/mail/vpopmail/files/patch-README.vpopmaild @@ -1,44 +1,44 @@ Description: Fix a couple of typos and grammatical errors. Forwarded: no Author: Peter Pentchev Last-Update: 2009-11-26 --- a/doc/README.vpopmaild +++ b/doc/README.vpopmaild @@ -243,7 +243,7 @@ - - Rights required: Must be a valid email address. - --Action: Verify the username and password of the persion desiring to -+Action: Verify the username and password of the person desiring to - login, and set their access rights. - - For the "login" command, a successful login will return a + + Rights required: Must be a valid email address. + +-Action: Verify the username and password of the persion desiring to ++Action: Verify the username and password of the person desiring to + login, and set their access rights. + + For the "login" command, a successful login will return a @@ -386,7 +386,7 @@ - - - The following values are returned as the character '1' or '0'. '1' --says the field is active which, for example an active no_password_change -+says the field is active - for example, an active no_password_change field - means the user can not change passwords. - - no_password_change, no_pop, no_webmail, no_imap, bounce_mail, no_relay, + + + The following values are returned as the character '1' or '0'. '1' +-says the field is active which, for example an active no_password_change ++says the field is active - for example, an active no_password_change field + means the user can not change passwords. + + no_password_change, no_pop, no_webmail, no_imap, bounce_mail, no_relay, @@ -631,7 +631,7 @@ - Rights required: SA_ADMIN - - Action: List all domains on the system, and their parent domain. --If the optional page is given, lines_per_page must be specified also. -+If the optional page is given, lines_per_page must also be specified. - When both are given, the data is broken up into pages with lines_per_page - lines on each. The page returned is specified by page. - + Rights required: SA_ADMIN + + Action: List all domains on the system, and their parent domain. +-If the optional page is given, lines_per_page must be specified also. ++If the optional page is given, lines_per_page must also be specified. + When both are given, the data is broken up into pages with lines_per_page + lines on each. The page returned is specified by page. + @@ -1088,7 +1088,7 @@ - The actual error messages are stored in the file vpopmaild.msg for easy translation. - Once there are other language files, I'll create a directory to store the various - language files, and use a symlink to select a language. Error messages are set --at comile time. -+at compile time. - --0.X represents a message passed up from fpopmaild primitives, and does not otherwise -+0.X represents a message passed up from vpopmaild primitives, and does not otherwise - follow the standard error reporting structure. (yet?) + The actual error messages are stored in the file vpopmaild.msg for easy translation. + Once there are other language files, I'll create a directory to store the various + language files, and use a symlink to select a language. Error messages are set +-at comile time. ++at compile time. + +-0.X represents a message passed up from fpopmaild primitives, and does not otherwise ++0.X represents a message passed up from vpopmaild primitives, and does not otherwise + follow the standard error reporting structure. (yet?) diff --git a/math/spar/Makefile b/math/spar/Makefile index 85fa78567cdc..80454151df0d 100644 --- a/math/spar/Makefile +++ b/math/spar/Makefile @@ -1,27 +1,28 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= spar PORTVERSION= 0.5.10 PORTREVISION= 3 CATEGORIES= math devel MASTER_SITES= SF/${PORTNAME}/Spar/${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Modular math parser -USES= libtool ncurses readline +USES= dos2unix libtool ncurses readline +DOS2UNIX_FILES= lib/randist/rand.c GNU_CONFIGURE= yes USE_CSTD= gnu89 USE_LDCONFIG= yes post-patch: @${REINPLACE_CMD} -e "s,-ldl,,g" \ ${WRKSRC}/lib/Makefile.in ${WRKSRC}/lib/module/Makefile.in @${REINPLACE_CMD} -e 's|-lcurses|-lncurses|' ${WRKSRC}/configure post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/spar/*.so .include diff --git a/math/spar/files/patch-calculator__Makefile.in b/math/spar/files/patch-calculator_Makefile.in similarity index 65% rename from math/spar/files/patch-calculator__Makefile.in rename to math/spar/files/patch-calculator_Makefile.in index 725ba36e31f9..e4515e87a212 100644 --- a/math/spar/files/patch-calculator__Makefile.in +++ b/math/spar/files/patch-calculator_Makefile.in @@ -1,11 +1,11 @@ ---- calculator/Makefile.in.orig Sun Jul 1 02:55:42 2001 -+++ calculator/Makefile.in Sun Jul 1 02:55:56 2001 -@@ -91,7 +91,7 @@ +--- calculator/Makefile.in.orig 2001-06-26 13:32:25 UTC ++++ calculator/Makefile.in +@@ -91,7 +91,7 @@ PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ +LIBS = @LIBS@ -lcompat spar_OBJECTS = commands.o commands_table.o shell.o spar.o spar_DEPENDENCIES = ../lib/.libs/libspar.so spar_LDFLAGS = diff --git a/math/spar/files/patch-configure b/math/spar/files/patch-configure index ce43259d9db6..6e1a2e8f0c2c 100644 --- a/math/spar/files/patch-configure +++ b/math/spar/files/patch-configure @@ -1,10 +1,10 @@ ---- configure.orig Tue Jun 26 05:46:47 2001 -+++ configure Sun Sep 8 15:42:06 2002 -@@ -1580,7 +1563,6 @@ +--- configure.orig 2001-06-26 12:46:47 UTC ++++ configure +@@ -1580,7 +1580,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo exec 5>>./config.log -CFLAGS="-Wall -O2" if test "$CC" = "gcc"; then CFLAGS="$CFLAGS -pipe" fi diff --git a/math/spar/files/patch-lib__randist__rand.c b/math/spar/files/patch-lib_randist_rand.c similarity index 61% rename from math/spar/files/patch-lib__randist__rand.c rename to math/spar/files/patch-lib_randist_rand.c index 792b9fa2ae9a..836d51c16ea0 100644 --- a/math/spar/files/patch-lib__randist__rand.c +++ b/math/spar/files/patch-lib_randist_rand.c @@ -1,10 +1,10 @@ ---- lib/randist/rand.c.orig Sun Jul 1 02:45:44 2001 -+++ lib/randist/rand.c Sun Jul 1 02:46:03 2001 +--- lib/randist/rand.c.orig 2016-06-20 13:16:43 UTC ++++ lib/randist/rand.c @@ -64,6 +64,7 @@ - * struct timeb to be defined. They can be - * found in timeb.h. - */ + * struct timeb to be defined. They can be + * found in timeb.h. + */ +#include - #include - void - sl_randomize (void) + #include + void + sl_randomize (void) diff --git a/multimedia/vdr-plugin-wirbelscan/Makefile b/multimedia/vdr-plugin-wirbelscan/Makefile index caedd025db0d..ed26f592c406 100644 --- a/multimedia/vdr-plugin-wirbelscan/Makefile +++ b/multimedia/vdr-plugin-wirbelscan/Makefile @@ -1,32 +1,33 @@ # Created by: Juergen Lock # $FreeBSD$ PORTNAME= vdr-plugin-wirbelscan PORTVERSION= 0.0.7 PORTREVISION= 6 CATEGORIES= multimedia MASTER_SITES= http://wirbel.htpc-forum.de/wirbelscan/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} MAINTAINER= ports@FreeBSD.org COMMENT= Video Disk Recorder - wirbelscan plugin -USES= tar:tgz +USES= dos2unix tar:tgz +DOS2UNIX_FILES= scanner.c PATCH_STRIP= -p1 HAVE_CONFIGURE= yes PORTDOCS= COPYING README HISTORY WRKSRC= ${WRKDIR}/${PLUGIN}-${DISTVERSION} .include "${.CURDIR}/../vdr/Makefile.plugins" post-patch: post-patch-plugin ${REINPLACE_CMD} -f ${FILESDIR}/types.sed ${WRKSRC}/*.c ${WRKSRC}/*.h pre-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vdr post-install: post-install-pluginlocales ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) .include diff --git a/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c b/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c index fc4ce34c9b74..5c6fa8443e94 100644 --- a/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c +++ b/multimedia/vdr-plugin-wirbelscan/files/patch-scanner.c @@ -1,11 +1,11 @@ --- a/scanner.c +++ b/scanner.c -@@ -633,7 +633,7 @@ void cScanner::Action(void) { - else - continue; - cCondWait::SleepMs(2000); -- vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE || V4L2_CAP_SLICED_VBI_CAPTURE); -+ vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE); - if (vbiSupport) - dlog(1, "device can capture vbi"); - } +@@ -633,7 +633,7 @@ void cScanner::Action(void) { + else + continue; + cCondWait::SleepMs(2000); +- vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE || V4L2_CAP_SLICED_VBI_CAPTURE); ++ vbiSupport = vcap.capabilities & (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE); + if (vbiSupport) + dlog(1, "device can capture vbi"); + } diff --git a/multimedia/w_scan/Makefile b/multimedia/w_scan/Makefile index 4d12b984e908..58fdffc98d51 100644 --- a/multimedia/w_scan/Makefile +++ b/multimedia/w_scan/Makefile @@ -1,46 +1,45 @@ # Created by: Juergen Lock # $FreeBSD$ PORTNAME= w_scan PORTVERSION= 20120415 CATEGORIES= multimedia MASTER_SITES= http://wirbel.htpc-forum.de/w_scan/ MAINTAINER= ports@FreeBSD.org COMMENT= Perform frequency scans for DVB and ATSC transmissions LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat -PATCH_STRIP= -lp1 - GNU_CONFIGURE= yes -USES= gettext iconv localbase tar:bzip2 +USES= dos2unix gettext iconv localbase tar:bzip2 +DOS2UNIX_GLOB= *.c *.h LDFLAGS+= ${ICONV_LIB} NO_WRKSUBDIR= yes PORTDOCS= COPYING ChangeLog README PLIST_FILES= bin/${PORTNAME} \ man/man1/${PORTNAME}.1.gz OPTIONS_DEFINE= LINUX DOCS LINUX_DESC= Install Linux binary too (linux-w_scan) LINUX_USE= LINUX=yes LINUX_RUN_DEPENDS= linux_dvbwrapper-kmod>=1.0:multimedia/linux_dvbwrapper-kmod LINUX_PLIST_FILES= bin/linux-${PORTNAME} post-patch: @${REINPLACE_CMD} -f ${FILESDIR}/types.sed ${WRKSRC}/configure ${WRKSRC}/*.c ${WRKSRC}/*.h @${CP} ${WRKSRC}/${PORTNAME} ${WRKSRC}/linux-${PORTNAME} post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) post-install-LINUX-on: (cd ${WRKSRC} && ${INSTALL_PROGRAM} linux-${PORTNAME} ${STAGEDIR}${PREFIX}/bin) .include diff --git a/multimedia/w_scan/files/patch-char-coding.c b/multimedia/w_scan/files/patch-char-coding.c index 2169ee592671..fb87b8a35811 100644 --- a/multimedia/w_scan/files/patch-char-coding.c +++ b/multimedia/w_scan/files/patch-char-coding.c @@ -1,35 +1,35 @@ ---- a/char-coding.c -+++ b/char-coding.c +--- char-coding.c.orig 2016-06-20 13:13:56 UTC ++++ char-coding.c @@ -250,6 +250,10 @@ void char_coding(char **inbuf, size_t * - // Fallback method: copy all printable chars from *inbuf to *outbuf. - size_t i; - size_t pos = 0; -+#ifdef __FreeBSD__ -+ int to_utf = user_charset_id < iconv_codes_count() && -+ !strncmp(iconv_codes[user_charset_id], "UTF", sizeof "UTF" - 1); -+#endif - - for (i = 0; i < nsrc; i++) { - switch((uint8_t) *(psrc + i)) { -@@ -257,7 +259,21 @@ void char_coding(char **inbuf, size_t * - //case 0xA0 ... 0xFF: - // printable chars ISO-6937-2 - // Figure A.1: Character code table 00 - Latin alphabet -+#ifdef __FreeBSD__ -+ case 0x80 ... 0xFF: -+ // the iconv used on FreeBSD doesn't know about the -+ // default DVB charset ISO_6937-2 so we'll end up here -+ // for 8-bit chars in channel names that are (usually -+ // wrongly) specified as the default charset - and if -+ // we are converting to utf those will create invalid -+ // encodings. -+ if (to_utf) -+ continue; -+ // FALLTHRU -+ case 0x01 ... 0x7F: -+#else - case 0x01 ... 0xFF: // 20121202: don't touch anything; leave it as it is. -+#endif - *(pdest + pos++) = *(psrc + i); - default:; - } + // Fallback method: copy all printable chars from *inbuf to *outbuf. + size_t i; + size_t pos = 0; ++#ifdef __FreeBSD__ ++ int to_utf = user_charset_id < iconv_codes_count() && ++ !strncmp(iconv_codes[user_charset_id], "UTF", sizeof "UTF" - 1); ++#endif + + for (i = 0; i < nsrc; i++) { + switch((uint8_t) *(psrc + i)) { +@@ -257,7 +261,21 @@ void char_coding(char **inbuf, size_t * + //case 0xA0 ... 0xFF: + // printable chars ISO-6937-2 + // Figure A.1: Character code table 00 - Latin alphabet ++#ifdef __FreeBSD__ ++ case 0x80 ... 0xFF: ++ // the iconv used on FreeBSD doesn't know about the ++ // default DVB charset ISO_6937-2 so we'll end up here ++ // for 8-bit chars in channel names that are (usually ++ // wrongly) specified as the default charset - and if ++ // we are converting to utf those will create invalid ++ // encodings. ++ if (to_utf) ++ continue; ++ // FALLTHRU ++ case 0x01 ... 0x7F: ++#else + case 0x01 ... 0xFF: // 20121202: don't touch anything; leave it as it is. ++#endif + *(pdest + pos++) = *(psrc + i); + default:; + } diff --git a/multimedia/w_scan/files/patch-clang b/multimedia/w_scan/files/patch-descriptors.c similarity index 84% rename from multimedia/w_scan/files/patch-clang rename to multimedia/w_scan/files/patch-descriptors.c index 77120dd5a8df..0bfcf37ed9e2 100644 --- a/multimedia/w_scan/files/patch-clang +++ b/multimedia/w_scan/files/patch-descriptors.c @@ -1,41 +1,39 @@ The code is using gnu C extensions. The following new patchfile under files/ fixes the issue: # cat files/patch-descriptors.c ---- a/descriptors.c 2012-10-03 12:39:42.000000000 +0200 -+++ b/descriptors.c 2012-10-03 12:39:56.000000000 +0200 -@@ -1000,6 +1000,16 @@ +--- descriptors.c.orig 2016-06-20 13:13:56 UTC ++++ descriptors.c +@@ -1000,6 +1000,16 @@ void parse_T2_delivery_system_descriptor } } +__u8 LeapYear(__u16 year) { + if ((year % 400) == 0) + return 1; + else if ((year % 100) == 0) + return 0; + else if ((year % 4) == 0) + return 1; + return 0; +} + /* 300468 v011101 annex C, Conversion between time and date conventions * NOTE: These formulas are applicable between the inclusive dates 1900 March 1 to 2100 February 28. -@@ -1011,16 +1021,6 @@ +@@ -1011,16 +1021,6 @@ struct tm modified_julian_date_to_utc(__ int _M = (int) (MJD - 14956.1 - (int) (_Y * 365.25)) / 30.6001; int K = (_M == 14) ? 1 : (_M == 15) ? 1 : 0; - __u8 LeapYear(__u16 year) { - if ((year % 400) == 0) - return 1; - else if ((year % 100) == 0) - return 0; - else if ((year % 4) == 0) - return 1; - return 0; - } - memset(&utc, 0, sizeof(struct tm)); utc.tm_mday = MJD - 14956 - (int) (_Y * 365.25) - (int) (_M * 30.6001); utc.tm_year = _Y + K; - - diff --git a/multimedia/w_scan/files/patch-scan.c b/multimedia/w_scan/files/patch-scan.c index 5fa98523dca7..88910e56532d 100644 --- a/multimedia/w_scan/files/patch-scan.c +++ b/multimedia/w_scan/files/patch-scan.c @@ -1,13 +1,25 @@ ---- a/scan.c -+++ b/scan.c -@@ -2936,8 +2936,8 @@ int main (int argc, char **argv) +--- scan.c.orig 2016-06-20 13:13:56 UTC ++++ scan.c +@@ -1816,7 +1816,11 @@ static int set_frontend(int frontend_fd, + case SCAN_TERRESTRIAL: + set_cmd_sequence(DTV_DELIVERY_SYSTEM, t->param.u.terr.delivery_system); + if (t->param.u.terr.delivery_system == SYS_DVBT2) { ++#ifndef DTV_DVBT2_PLP_ID ++ set_cmd_sequence(DTV_DVBT2_PLP_ID_LEGACY, t->pids.plp_id); ++#else + set_cmd_sequence(DTV_DVBT2_PLP_ID, t->pids.plp_id); ++#endif + } + set_cmd_sequence(DTV_FREQUENCY, t->param.frequency); + set_cmd_sequence(DTV_INVERSION, t->param.inversion); +@@ -3010,8 +3014,8 @@ int main (int argc, char **argv) cleanup(); return -1; } - if (((adapter > 7) && (adapter != 999)) || (adapter < 0)) { - info("Invalid adapter: out of range (0..7)\n"); + if (((adapter > 255) && (adapter != 999)) || (adapter < 0)) { + info("Invalid adapter: out of range (0..255)\n"); bad_usage(argv[0]); cleanup(); return -1; diff --git a/multimedia/w_scan/files/patch-z-scan.c b/multimedia/w_scan/files/patch-z-scan.c deleted file mode 100644 index 860de10895b1..000000000000 --- a/multimedia/w_scan/files/patch-z-scan.c +++ /dev/null @@ -1,14 +0,0 @@ ---- a/scan.c -+++ b/scan.c -@@ -1816,7 +1816,11 @@ static int set_frontend(int frontend_fd, - case SCAN_TERRESTRIAL: - set_cmd_sequence(DTV_DELIVERY_SYSTEM, t->param.u.terr.delivery_system); - if (t->param.u.terr.delivery_system == SYS_DVBT2) { -+#ifndef DTV_DVBT2_PLP_ID -+ set_cmd_sequence(DTV_DVBT2_PLP_ID_LEGACY, t->pids.plp_id); -+#else - set_cmd_sequence(DTV_DVBT2_PLP_ID, t->pids.plp_id); -+#endif - } - set_cmd_sequence(DTV_FREQUENCY, t->param.frequency); - set_cmd_sequence(DTV_INVERSION, t->param.inversion); diff --git a/net-im/mbpurple/Makefile b/net-im/mbpurple/Makefile index ce946fe6bf5e..6e4fc9406100 100644 --- a/net-im/mbpurple/Makefile +++ b/net-im/mbpurple/Makefile @@ -1,29 +1,30 @@ # $FreeBSD$ PORTNAME= mbpurple PORTVERSION= 0.3.0 PORTREVISION= 3 CATEGORIES= net-im MASTER_SITES= GOOGLE_CODE PROJECTHOST= microblog-purple MAINTAINER= ports@FreeBSD.org COMMENT= Integrate Twitter with Pidgin (AKA microblog-purple) BUILD_DEPENDS= ${LOCALBASE}/bin/pidgin:net-im/pidgin RUN_DEPENDS= ${LOCALBASE}/bin/pidgin:net-im/pidgin LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= gmake pkgconfig +USES= dos2unix gmake pkgconfig +DOS2UNIX_GLOB= *.c MAKE_ARGS= PREFIX="${PREFIX}" LIBDIR="${PREFIX}/lib" \ PURPLE_DATAROOT_DIR="${PREFIX}/share" post-patch: @${REINPLACE_CMD} 's/make -C/$$(MAKE) -C/' ${WRKSRC}/Makefile post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/purple-2/*.so .include diff --git a/net-im/mbpurple/files/patch-microblog__mb_net.c b/net-im/mbpurple/files/patch-microblog_mb__net.c similarity index 69% rename from net-im/mbpurple/files/patch-microblog__mb_net.c rename to net-im/mbpurple/files/patch-microblog_mb__net.c index 818c30cb2e7f..077b0f249c02 100644 --- a/net-im/mbpurple/files/patch-microblog__mb_net.c +++ b/net-im/mbpurple/files/patch-microblog_mb__net.c @@ -1,19 +1,17 @@ -diff --git a/microblog/mb_net.c b/microblog/mb_net.c -index 2752aba..962ac1f 100644 ---- microblog/mb_net.c +--- microblog/mb_net.c.orig 2016-06-20 15:55:29 UTC +++ microblog/mb_net.c -@@ -160,13 +160,13 @@ void mb_conn_fetch_url_cb(PurpleUtilFetchUrlData * url_data, gpointer user_data, - conn_data->fetch_url_data = NULL; - - if(error_message != NULL) { -- mb_conn_data_free(conn_data); - if(conn_data->handler) { - retval = conn_data->handler(conn_data, conn_data->handler_data, error_message); - } - if(ma->gc != NULL) { - purple_connection_error_reason(ma->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message); - } -+ mb_conn_data_free(conn_data); - } else { - mb_http_data_post_read(conn_data->response, url_text, len); - if(conn_data->handler) { +@@ -160,13 +160,13 @@ void mb_conn_fetch_url_cb(PurpleUtilFetc + conn_data->fetch_url_data = NULL; + + if(error_message != NULL) { +- mb_conn_data_free(conn_data); + if(conn_data->handler) { + retval = conn_data->handler(conn_data, conn_data->handler_data, error_message); + } + if(ma->gc != NULL) { + purple_connection_error_reason(ma->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message); + } ++ mb_conn_data_free(conn_data); + } else { + mb_http_data_post_read(conn_data->response, url_text, len); + if(conn_data->handler) { diff --git a/net-mgmt/cdpr/Makefile b/net-mgmt/cdpr/Makefile index 077efaaae6e2..0596578becbb 100644 --- a/net-mgmt/cdpr/Makefile +++ b/net-mgmt/cdpr/Makefile @@ -1,30 +1,32 @@ # Created by: Michael L. Hostbaek (mich@freebsdcluster.org) # $FreeBSD$ PORTNAME= cdpr PORTVERSION= 2.2.1 CATEGORIES= net-mgmt MASTER_SITES= SF MAINTAINER= mich@FreeBSD.org COMMENT= Cisco Discovery Protocol Reporter +USES= dos2unix +DOS2UNIX_GLOB= *.c *.h LDFLAGS+= -L${LOCALBASE}/lib -lpcap DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} OPTIONS_DEFINE= DOCS do-build: (cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -o ${PORTNAME} ${PORTNAME}.c cdprs.c conffile.c) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/cdprs/* ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/cdpr.conf ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.cdprs ${STAGEDIR}${DOCSDIR} .include diff --git a/net-mgmt/cdpr/files/patch-cdpr.c b/net-mgmt/cdpr/files/patch-cdpr.c index 8c591de71e7e..3a83c518fad5 100644 --- a/net-mgmt/cdpr/files/patch-cdpr.c +++ b/net-mgmt/cdpr/files/patch-cdpr.c @@ -1,36 +1,36 @@ ---- cdpr.c.orig Wed Nov 19 17:53:13 2003 -+++ cdpr.c Wed Nov 19 17:54:06 2003 -@@ -639,7 +639,7 @@ +--- cdpr.c.orig 2016-06-20 14:44:21 UTC ++++ cdpr.c +@@ -641,7 +641,7 @@ main(int argc, char *argv[]) pcap_lookupnet(dev, &net, &mask, errbuf); /* Open the pcap device */ - if((handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf)) == NULL) + if((handle = pcap_open_live(dev, BUFSIZ, 1, 1000, errbuf)) == NULL) { printf("Error opening device (%s)\n", errbuf); exit(1); -@@ -656,11 +656,6 @@ +@@ -658,11 +658,6 @@ main(int argc, char *argv[]) pcap_setfilter(handle, &filter); pcap_freecode(&filter); - /* Set non-blocking mode */ - if(pcap_setnonblock(handle, 1, errbuf)) - { - pcap_perror(handle, NULL); - } /* Get the next packet that comes in, we only need one */ printf("Waiting for CDP advertisement:\n"); -@@ -671,11 +666,7 @@ +@@ -673,11 +668,7 @@ main(int argc, char *argv[]) do { packet = pcap_next(handle, &header); -#ifdef WIN32 - Sleep(10000); -#else - usleep(10000); -#endif + } while ((!packet) && ( timeout=((start_time+seconds) > (unsigned int)time(NULL))) ); /* diff --git a/net-mgmt/cdpr/files/patch-conffile.c b/net-mgmt/cdpr/files/patch-conffile.c index 0ca7c053adc7..ef5a7d1191a4 100644 --- a/net-mgmt/cdpr/files/patch-conffile.c +++ b/net-mgmt/cdpr/files/patch-conffile.c @@ -1,19 +1,19 @@ ---- conffile.c.orig +--- conffile.c.orig 2016-06-20 14:44:21 UTC +++ conffile.c -@@ -57,6 +57,7 @@ - struct hostent *h; - char *addy; - int port; -+ char *tport; - - if (ip && url) - { -@@ -70,7 +71,7 @@ - else - { - strtok(ip,":"); -- char *tport = strtok(NULL,":"); -+ tport = strtok(NULL,":"); - port = atoi(tport); - } - /* +@@ -57,6 +57,7 @@ do_something_with (char *ip, char *url) + struct hostent *h; + char *addy; + int port; ++ char *tport; + + if (ip && url) + { +@@ -70,7 +71,7 @@ do_something_with (char *ip, char *url) + else + { + strtok(ip,":"); +- char *tport = strtok(NULL,":"); ++ tport = strtok(NULL,":"); + port = atoi(tport); + } + /* diff --git a/net-p2p/gnewtellium/Makefile b/net-p2p/gnewtellium/Makefile index d812c31389fa..06a07ceb2011 100644 --- a/net-p2p/gnewtellium/Makefile +++ b/net-p2p/gnewtellium/Makefile @@ -1,23 +1,24 @@ # Created by: haikal # $FreeBSD$ PORTNAME= gnewtellium PORTVERSION= 0.05b PORTREVISION= 5 CATEGORIES= net-p2p MASTER_SITES= SF MAINTAINER= bofh@FreeBSD.org COMMENT= Gnutella client PORTSCOUT= skipv:0.05 # older than current one USE_GNOME= gtk12 -USES= gmake +USES= dos2unix gmake +DOS2UNIX_GLOB= *.c GNU_CONFIGURE= yes MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \ AUTOHEADER="${TRUE}" PLIST_FILES= bin/gnewtellium %%DATADIR%%/pixmaps/gnewtellium.xpm .include diff --git a/net-p2p/gnewtellium/files/patch-src__config.c b/net-p2p/gnewtellium/files/patch-src_config.c similarity index 89% rename from net-p2p/gnewtellium/files/patch-src__config.c rename to net-p2p/gnewtellium/files/patch-src_config.c index 54d3eba3f8be..8c2d7e2a2535 100644 --- a/net-p2p/gnewtellium/files/patch-src__config.c +++ b/net-p2p/gnewtellium/files/patch-src_config.c @@ -1,55 +1,55 @@ ---- src/config.c.orig Tue Feb 5 03:50:18 2002 -+++ src/config.c Tue Mar 9 20:37:00 2004 -@@ -539,8 +539,8 @@ - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show(hbox); - -- label = gtk_label_new("Let Newtella know what speed your Internet Connection is. --Setting this to an accurate number will help you get the most out of -+ label = gtk_label_new("Let Newtella know what speed your Internet Connection is.\n\ -+Setting this to an accurate number will help you get the most out of\n\ - Newtella's advanced bandwidth management."); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - hbox = gtk_hbox_new(FALSE, 0); -@@ -579,7 +579,7 @@ - gtk_widget_show(button); - - hbox = gtk_hbox_new(FALSE, 0); -- label = gtk_label_new("Select the directory where you want to store your newly -+ label = gtk_label_new("Select the directory where you want to store your newly\n\ - downloaded files."); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); -@@ -627,8 +627,8 @@ - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); - -- label = gtk_label_new("Add any number of directories here. --All .mp3 files under any of these directories can then be -+ label = gtk_label_new("Add any number of directories here.\n\ -+All .mp3 files under any of these directories can then be\n\ - downloaded by other Newtella users."); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - hbox = gtk_hbox_new(FALSE, 0); -@@ -686,8 +686,8 @@ - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); - - hbox = gtk_hbox_new(FALSE, 0); -- label = gtk_label_new("Select how much search results Newtella will maximally send to --other clients. Use this to limit the impact of stupid searches on your -+ label = gtk_label_new("Select how much search results Newtella will maximally send to\n\ -+other clients. Use this to limit the impact of stupid searches on your\n\ - computer."); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); -@@ -724,8 +724,8 @@ - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); - - hbox = gtk_hbox_new(FALSE, 0); -- label = gtk_label_new("Returns the entered IP with search results instead of your real one. --Useful if your're behind a NAT Firewall (like Windows 98 Internet -+ label = gtk_label_new("Returns the entered IP with search results instead of your real one.\n\ -+Useful if your're behind a NAT Firewall (like Windows 98 Internet\n\ - Connection Sharing)"); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); +--- src/config.c.orig 2016-06-20 14:36:47 UTC ++++ src/config.c +@@ -539,8 +539,8 @@ void config_draw(void) + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show(hbox); + +- label = gtk_label_new("Let Newtella know what speed your Internet Connection is. +-Setting this to an accurate number will help you get the most out of ++ label = gtk_label_new("Let Newtella know what speed your Internet Connection is.\n\ ++Setting this to an accurate number will help you get the most out of\n\ + Newtella's advanced bandwidth management."); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); + hbox = gtk_hbox_new(FALSE, 0); +@@ -579,7 +579,7 @@ Newtella's advanced bandwidth management + gtk_widget_show(button); + + hbox = gtk_hbox_new(FALSE, 0); +- label = gtk_label_new("Select the directory where you want to store your newly ++ label = gtk_label_new("Select the directory where you want to store your newly\n\ + downloaded files."); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); +@@ -627,8 +627,8 @@ downloaded files."); + gtk_widget_show(hbox); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); + +- label = gtk_label_new("Add any number of directories here. +-All .mp3 files under any of these directories can then be ++ label = gtk_label_new("Add any number of directories here.\n\ ++All .mp3 files under any of these directories can then be\n\ + downloaded by other Newtella users."); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); + hbox = gtk_hbox_new(FALSE, 0); +@@ -686,8 +686,8 @@ downloaded by other Newtella users."); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); + + hbox = gtk_hbox_new(FALSE, 0); +- label = gtk_label_new("Select how much search results Newtella will maximally send to +-other clients. Use this to limit the impact of stupid searches on your ++ label = gtk_label_new("Select how much search results Newtella will maximally send to\n\ ++other clients. Use this to limit the impact of stupid searches on your\n\ + computer."); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); +@@ -724,8 +724,8 @@ computer."); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10); + + hbox = gtk_hbox_new(FALSE, 0); +- label = gtk_label_new("Returns the entered IP with search results instead of your real one. +-Useful if your're behind a NAT Firewall (like Windows 98 Internet ++ label = gtk_label_new("Returns the entered IP with search results instead of your real one.\n\ ++Useful if your're behind a NAT Firewall (like Windows 98 Internet\n\ + Connection Sharing)"); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); diff --git a/net-p2p/torrentsniff/Makefile b/net-p2p/torrentsniff/Makefile index eca0a26e6794..e843760b96da 100644 --- a/net-p2p/torrentsniff/Makefile +++ b/net-p2p/torrentsniff/Makefile @@ -1,25 +1,25 @@ # Created by: Pav Lucistnik # $FreeBSD$ PORTNAME= torrentsniff PORTVERSION= 0.3.0 PORTREVISION= 1 CATEGORIES= net-p2p perl5 MASTER_SITES= http://www.highprogrammer.com/alan/perl/ MAINTAINER= jharris@widomaker.com COMMENT= Commandline tool for getting status of torrent RUN_DEPENDS= p5-libwww>=0:www/p5-libwww \ p5-Digest-SHA1>=0:security/p5-Digest-SHA1 NO_BUILD= yes -USES= shebangfix perl5 +USES= dos2unix shebangfix perl5 SHEBANG_FILES= torrentsniff do-install: ${INSTALL_SCRIPT} ${WRKSRC}/torrentsniff ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/BitTorrent ${INSTALL_DATA} ${WRKSRC}/BitTorrent/BDecode.pm ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/BitTorrent .include diff --git a/net-p2p/torrentsniff/files/patch-BitTorrent-BDecode.pm b/net-p2p/torrentsniff/files/patch-BitTorrent-BDecode.pm deleted file mode 100644 index 9caadb0eda4e..000000000000 --- a/net-p2p/torrentsniff/files/patch-BitTorrent-BDecode.pm +++ /dev/null @@ -1,10 +0,0 @@ ---- BitTorrent/BDecode.pm.orig Sun Jun 15 05:47:46 2003 -+++ BitTorrent/BDecode.pm Fri Nov 14 18:42:44 2003 -@@ -5,7 +5,6 @@ - use Carp; - use base 'Exporter'; - use strict; --our @EXPORT_OK = qw(bdecode); - - sub bdecode { - my ($dataref) = @_; diff --git a/net-p2p/torrentsniff/files/patch-BitTorrent_BDecode.pm b/net-p2p/torrentsniff/files/patch-BitTorrent_BDecode.pm new file mode 100644 index 000000000000..43b9a4dab7ac --- /dev/null +++ b/net-p2p/torrentsniff/files/patch-BitTorrent_BDecode.pm @@ -0,0 +1,10 @@ +--- BitTorrent/BDecode.pm.orig 2016-06-20 14:38:26 UTC ++++ BitTorrent/BDecode.pm +@@ -5,7 +5,6 @@ package BitTorrent::BDecode; + use Carp; + use base 'Exporter'; + use strict; +-our @EXPORT_OK = qw(bdecode); + + sub bdecode { + my ($dataref) = @_; diff --git a/net-p2p/torrentsniff/files/patch-torrentsniff b/net-p2p/torrentsniff/files/patch-torrentsniff index 03062bb7be8e..6c14566c0ed9 100644 --- a/net-p2p/torrentsniff/files/patch-torrentsniff +++ b/net-p2p/torrentsniff/files/patch-torrentsniff @@ -1,11 +1,11 @@ ---- torrentsniff.orig Fri Nov 14 18:17:20 2003 -+++ torrentsniff Fri Nov 14 18:27:24 2003 -@@ -115,7 +115,7 @@ - my($file, $report_file_info, $report_tracker_info) = @_; - print "$file\n"; - local *TOR; -- if( not open(TOR, "<", $file) ) { -+ if( not open(TOR, "< $file") ) { - print STDERR "Unable to read $file because of $!\n"; - return 0; - } +--- torrentsniff.orig 2016-06-20 14:38:26 UTC ++++ torrentsniff +@@ -115,7 +115,7 @@ sub process_file { + my($file, $report_file_info, $report_tracker_info) = @_; + print "$file\n"; + local *TOR; +- if( not open(TOR, "<", $file) ) { ++ if( not open(TOR, "< $file") ) { + print STDERR "Unable to read $file because of $!\n"; + return 0; + } diff --git a/net/bittwist/Makefile b/net/bittwist/Makefile index 7ea14a6142f2..39260ef14fb6 100644 --- a/net/bittwist/Makefile +++ b/net/bittwist/Makefile @@ -1,20 +1,21 @@ # $FreeBSD$ PORTNAME= bittwist PORTVERSION= 1.1 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/_BSD/Bit-Twist%20${PORTVERSION} DISTNAME= ${PORTNAME}-bsd-${PORTVERSION} MAINTAINER= wxs@FreeBSD.org COMMENT= Libpcap-based Ethernet packet generator, with PCAP editor WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -USES= gmake +USES= dos2unix gmake +DOS2UNIX_FILES= Makefile PLIST_FILES= bin/bittwist bin/bittwistb bin/bittwiste \ man/man1/bittwist.1.gz \ man/man1/bittwistb.1.gz \ man/man1/bittwiste.1.gz .include diff --git a/net/bittwist/files/patch-Makefile b/net/bittwist/files/patch-Makefile index f58c9ccc1f8b..346daa8b558a 100644 --- a/net/bittwist/files/patch-Makefile +++ b/net/bittwist/files/patch-Makefile @@ -1,29 +1,29 @@ ---- Makefile.orig 2011-02-24 23:23:42.000000000 +0800 -+++ Makefile 2014-06-23 10:40:19.186220280 +0800 +--- Makefile.orig 2016-06-20 15:56:31 UTC ++++ Makefile @@ -1,6 +1,6 @@ - SHELL = /bin/sh - --prefix = /usr/local -+prefix = ${PREFIX} - exec_prefix = ${prefix} - bindir = ${exec_prefix}/bin - mandir = ${prefix}/man/man1 -@@ -31,12 +31,12 @@ clean: - rm -f $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste - - install: -- mkdir -p $(bindir) -- chmod 755 $(bindir) -- $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(bindir) -- mkdir -p $(mandir) -- chmod 755 $(mandir) -- $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(mandir) -+ mkdir -p $(DESTDIR)$(bindir) -+ chmod 755 $(DESTDIR)$(bindir) -+ $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(DESTDIR)$(bindir) -+ mkdir -p $(DESTDIR)$(mandir) -+ chmod 755 $(DESTDIR)$(mandir) -+ $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(DESTDIR)$(mandir) - - uninstall: - rm -f $(bindir)/bittwist $(bindir)/bittwistb $(bindir)/bittwiste + SHELL = /bin/sh + +-prefix = /usr/local ++prefix = ${PREFIX} + exec_prefix = ${prefix} + bindir = ${exec_prefix}/bin + mandir = ${prefix}/man/man1 +@@ -31,12 +31,12 @@ clean: + rm -f $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste + + install: +- mkdir -p $(bindir) +- chmod 755 $(bindir) +- $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(bindir) +- mkdir -p $(mandir) +- chmod 755 $(mandir) +- $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(mandir) ++ mkdir -p $(DESTDIR)$(bindir) ++ chmod 755 $(DESTDIR)$(bindir) ++ $(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(DESTDIR)$(bindir) ++ mkdir -p $(DESTDIR)$(mandir) ++ chmod 755 $(DESTDIR)$(mandir) ++ $(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(DESTDIR)$(mandir) + + uninstall: + rm -f $(bindir)/bittwist $(bindir)/bittwistb $(bindir)/bittwiste diff --git a/net/hlmaster/Makefile b/net/hlmaster/Makefile index a6ff532b32b9..224448d36aa3 100644 --- a/net/hlmaster/Makefile +++ b/net/hlmaster/Makefile @@ -1,28 +1,30 @@ # Created by: pat@databits.net # $FreeBSD$ PORTNAME= hlmaster PORTVERSION= 0.9.3 CATEGORIES= net games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Half-Life game master server daemon +USES= dos2unix +DOS2UNIX_GLOB= *.cpp GNU_CONFIGURE= yes OPTIONS_DEFINE= DOCS EXAMPLES pre-patch: @${REINPLACE_CMD} -e 's|-O2||' ${WRKSRC}/configure @${FIND} ${WRKSRC} -name Makefile.in | \ ${XARGS} ${REINPLACE_CMD} -e 's|CXXFLAGS = -O2 -Wall||' post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/*.list ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/woncomm.lst ${STAGEDIR}${EXAMPLESDIR} .include diff --git a/net/hlmaster/files/patch-HLServerList.cpp b/net/hlmaster/files/patch-src_HLServerList.cpp similarity index 67% rename from net/hlmaster/files/patch-HLServerList.cpp rename to net/hlmaster/files/patch-src_HLServerList.cpp index 2a652ccc7076..5300fb1e25ec 100644 --- a/net/hlmaster/files/patch-HLServerList.cpp +++ b/net/hlmaster/files/patch-src_HLServerList.cpp @@ -1,20 +1,20 @@ ---- src/HLServerList.cpp.orig 2007-08-03 13:52:50.000000000 +0200 -+++ src/HLServerList.cpp 2007-08-03 13:53:27.000000000 +0200 -@@ -73,7 +73,7 @@ - m_nSkipRequests = 0; - - // initialize challenge number (should be random) -- m_nChallengeSeed = (int) &m_pHeadDummyItem; -+ m_nChallengeSeed = (intptr_t) &m_pHeadDummyItem; - } - - -@@ -604,7 +604,7 @@ - if(pItem != NULL) - { - // get a fresh, random id -- pItem->m_nChallengeId = GetRandomChallenge((int)&pItem, (int)nTimestamp); -+ pItem->m_nChallengeId = GetRandomChallenge((intptr_t)&pItem, (int)nTimestamp); - } - } - +--- src/HLServerList.cpp.orig 2016-06-20 15:57:45 UTC ++++ src/HLServerList.cpp +@@ -73,7 +73,7 @@ HLServerList::HLServerList(int nMaxItems + m_nSkipRequests = 0; + + // initialize challenge number (should be random) +- m_nChallengeSeed = (int) &m_pHeadDummyItem; ++ m_nChallengeSeed = (intptr_t) &m_pHeadDummyItem; + } + + +@@ -604,7 +604,7 @@ HLServerListItem* HLServerList::HeartBea + if(pItem != NULL) + { + // get a fresh, random id +- pItem->m_nChallengeId = GetRandomChallenge((int)&pItem, (int)nTimestamp); ++ pItem->m_nChallengeId = GetRandomChallenge((intptr_t)&pItem, (int)nTimestamp); + } + } + diff --git a/net/rtptools/Makefile b/net/rtptools/Makefile index 04c651b10ba1..ad129ac5df8d 100644 --- a/net/rtptools/Makefile +++ b/net/rtptools/Makefile @@ -1,23 +1,25 @@ # Created by: fenner # $FreeBSD$ PORTNAME= rtptools PORTVERSION= 1.20 CATEGORIES= net mbone MASTER_SITES= http://www.cs.columbia.edu/IRT/software/rtptools/download/ MAINTAINER= cpm@fbsd.es COMMENT= Set of tools to record, playback, and monitor RTPv2 data streams +USES= dos2unix +DOS2UNIX_GLOB= *.c GNU_CONFIGURE= yes PLIST_FILES= bin/rtpdump bin/rtpplay bin/rtpsend bin/rtptrans PORTDOCS= README ChangeLog.html rtptools.html OPTIONS_DEFINE= DOCS post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/net/rtptools/files/patch-rtp.h b/net/rtptools/files/patch-rtp.h index c1d142b4a914..456bb3dce34c 100644 --- a/net/rtptools/files/patch-rtp.h +++ b/net/rtptools/files/patch-rtp.h @@ -1,23 +1,23 @@ ---- rtp.h.orig Thu Mar 9 07:35:26 2000 -+++ rtp.h Sat Apr 21 21:52:49 2001 -@@ -110,13 +110,18 @@ +--- rtp.h.orig 2001-12-29 12:48:24 UTC ++++ rtp.h +@@ -112,13 +112,18 @@ typedef struct { #define RTCP_VALID_MASK (0xc000 | 0x2000 | 0xfe) #define RTCP_VALID_VALUE ((RTP_VERSION << 14) | RTCP_SR) +#define RTCP_FRACTION(x) (((x) >> 24) & 0xFF) +#define RTCP_LOST(x) ((((x) & 0xFFFFFF) < 0x800000) ? \ + ((x) & 0xFFFFFF) \ + : (((x) & 0xFFFFFF) - 0x1000000)) + /* * Reception report block */ typedef struct { u_int32 ssrc; /* data source being reported */ - unsigned int fraction:8; /* fraction lost since last SR/RR */ - int lost:24; /* cumul. no. pkts lost (signed!) */ + u_int32 fraclost; /* fraction lost since last SR/RR and */ + /* cumul. no. pkts lost (signed!) */ u_int32 last_seq; /* extended last seq. no. received */ u_int32 jitter; /* interarrival jitter */ u_int32 lsr; /* last SR packet from this source */ diff --git a/net/rtptools/files/patch-rtpdump.c b/net/rtptools/files/patch-rtpdump.c index 28056951ca69..e353f478436a 100644 --- a/net/rtptools/files/patch-rtpdump.c +++ b/net/rtptools/files/patch-rtpdump.c @@ -1,24 +1,24 @@ ---- rtpdump.c.orig Sat Apr 7 08:02:13 2001 -+++ rtpdump.c Sat Apr 21 21:54:10 2001 -@@ -429,8 +429,8 @@ +--- rtpdump.c.orig 2016-06-20 15:59:04 UTC ++++ rtpdump.c +@@ -441,8 +441,8 @@ static int parse_control(FILE *out, char for (i = 0; i < r->common.count; i++) { fprintf(out, " (ssrc=0x%lx fraction=%g lost=%lu last_seq=%lu jit=%lu lsr=%lu dlsr=%lu )\n", (unsigned long)ntohl(r->r.sr.rr[i].ssrc), - r->r.sr.rr[i].fraction / 256., - (unsigned long)ntohl(r->r.sr.rr[i].lost), /* XXX I'm pretty sure this is wrong */ + RTCP_FRACTION(ntohl(r->r.sr.rr[i].fraclost)) / 256., + RTCP_LOST(ntohl(r->r.sr.rr[i].fraclost)), (unsigned long)ntohl(r->r.sr.rr[i].last_seq), (unsigned long)ntohl(r->r.sr.rr[i].jitter), (unsigned long)ntohl(r->r.sr.rr[i].lsr), -@@ -446,8 +446,8 @@ +@@ -458,8 +458,8 @@ static int parse_control(FILE *out, char for (i = 0; i < r->common.count; i++) { fprintf(out, " (ssrc=0x%lx fraction=%g lost=%lu last_seq=%lu jit=%lu lsr=%lu dlsr=%lu )\n", (unsigned long)ntohl(r->r.rr.rr[i].ssrc), - r->r.rr.rr[i].fraction / 256., - (unsigned long)ntohl(r->r.rr.rr[i].lost), + RTCP_FRACTION(ntohl(r->r.rr.rr[i].fraclost)) / 256., + RTCP_LOST(ntohl(r->r.rr.rr[i].fraclost)), (unsigned long)ntohl(r->r.rr.rr[i].last_seq), (unsigned long)ntohl(r->r.rr.rr[i].jitter), (unsigned long)ntohl(r->r.rr.rr[i].lsr), diff --git a/net/rtptools/files/patch-rtpsend.c b/net/rtptools/files/patch-rtpsend.c index 2003e898f0ab..1153d0816ca1 100644 --- a/net/rtptools/files/patch-rtpsend.c +++ b/net/rtptools/files/patch-rtpsend.c @@ -1,24 +1,24 @@ ---- rtpsend.c.orig Tue Sep 10 13:24:10 2002 -+++ rtpsend.c Sat Aug 16 08:58:12 2003 -@@ -353,9 +353,9 @@ +--- rtpsend.c.orig 2016-06-20 15:59:04 UTC ++++ rtpsend.c +@@ -354,9 +354,9 @@ static int rtcp_rr(node_t *list, char *p if (strcmp(n->type, "ssrc") == 0) rr->ssrc = htonl(n->num); else if (strcmp(n->type, "fraction") == 0) - rr->fraction = (n->num)*256; - else if (strcmp(n->type, "lost") == 0) /* PP: alignment OK? */ - rr->lost = htonl(n->num); + rr->fraclost = htonl((ntohl(rr->fraclost) & 0x00ffffff) | ((n->num)*256 << 24)); + else if (strcmp(n->type, "lost") == 0) + rr->fraclost = htonl((ntohl(rr->fraclost) & 0xff000000) | n->num); else if (strcmp(n->type, "last_seq") == 0) rr->last_seq = htonl(n->num); else if (strcmp(n->type, "jit") == 0) -@@ -919,6 +919,8 @@ - local = (struct in_addr *)host->h_addr_list[0]; - sin.sin_addr = *local; +@@ -926,6 +926,8 @@ int main(int argc, char *argv[]) + local = (struct in_addr *)host->h_addr_list[0]; + sin.sin_addr = *local; } + } else { + usage(argv[0]); } /* create/connect sockets */ diff --git a/news/newsfetch/Makefile b/news/newsfetch/Makefile index 56178b3c0ad2..2d33f2ec12c7 100644 --- a/news/newsfetch/Makefile +++ b/news/newsfetch/Makefile @@ -1,27 +1,28 @@ # Created by: Jun-ichiro itojun Itoh # $FreeBSD$ PORTNAME= newsfetch PORTVERSION= 1.21 PORTREVISION= 2 CATEGORIES= news MASTER_SITES= SUNSITE/system/news/readers MAINTAINER= ports@FreeBSD.org COMMENT= Download news articles from NNTP server MAKE_ENV= BINDIR="${PREFIX}/bin" MANDIR="${PREFIX}/man/man" -USES= uidfix +USES= dos2unix uidfix +DOS2UNIX_GLOB= *.c CFLAGS+= -Wno-return-type PLIST_FILES= bin/newsfetch \ man/man1/newsfetch.1.gz do-configure: (cd ${WRKSRC} && ( \ ${ECHO_CMD} "PROG= newsfetch"; \ ${ECHO_CMD} "SRCS=" *.c; \ ${ECHO_CMD} ".include "; \ ) > Makefile) .include diff --git a/news/newsfetch/files/patch-newsfetch.1 b/news/newsfetch/files/patch-newsfetch.1 index 5f9b06ccbe17..57d9634c48da 100644 --- a/news/newsfetch/files/patch-newsfetch.1 +++ b/news/newsfetch/files/patch-newsfetch.1 @@ -1,11 +1,11 @@ ---- newsfetch.1.orig Tue Apr 14 20:04:25 1998 -+++ newsfetch.1 Fri Jan 26 23:41:22 2001 -@@ -5,7 +5,7 @@ +--- newsfetch.1.orig 1998-04-14 11:04:25 UTC ++++ newsfetch.1 +@@ -5,7 +5,7 @@ newsfetch - Pull news from an NNTP serve .SH SYNOPSIS .B newsfetch .BI -hostname +hostname[:port] [ .BI \-clsyvV ] diff --git a/news/newsfetch/files/patch-newsfetch.c b/news/newsfetch/files/patch-newsfetch.c index 46a011aca30d..ad82fa13f0a3 100644 --- a/news/newsfetch/files/patch-newsfetch.c +++ b/news/newsfetch/files/patch-newsfetch.c @@ -1,44 +1,44 @@ ---- newsfetch.c.orig Thu Jul 23 18:28:56 1998 -+++ newsfetch.c Fri Jan 26 23:41:22 2001 +--- newsfetch.c.orig 2016-06-20 15:59:53 UTC ++++ newsfetch.c @@ -7,6 +7,7 @@ #include +#include #include #include #include -@@ -28,6 +29,7 @@ +@@ -28,6 +29,7 @@ int terminate = 1; int wait_after_articles = 0, articles_fetched=0, last_than_current; int wait_for_time = 0, timeout=READ_TIMEOUT, article_fetching=0; int cleanup=1, max_article, news_target=0, first_article, only_list=0; +int port = 119; char group[100], pipe_command[100]; FILE *rcfp, *rctmpfp, *socket_fp[2]; char lockfile[100]; -@@ -59,6 +61,16 @@ +@@ -59,6 +61,16 @@ if(argc < 2) getHomedir(homedir); strcpy(hostname,argv[1]); + { + char *p; + int n; + + if (NULL != (p = strchr(hostname, ':')) && 0 < (n = atoi(p + 1))) { + port = n; + *p = '\0'; + } + } + get_commandline(argc, argv, dirname, rcfile, &cleanup, &wait_after_articles, &wait_for_time, &command_flag, execute_command, -@@ -75,7 +87,7 @@ +@@ -75,7 +87,7 @@ if(argc < 2) generateProcmailrc(homedir, rcfile, dirname, pipe_command); } - socket_id=ConnectServer(hostname,119, 0); + socket_id=ConnectServer(hostname, port, 0); /* two file descriptor are for portability among diff systems */ createFd(socket_id, socket_fp); diff --git a/news/newsfetch/files/patch-nntp.c b/news/newsfetch/files/patch-nntp.c index 55053131253a..7cccadece3c5 100644 --- a/news/newsfetch/files/patch-nntp.c +++ b/news/newsfetch/files/patch-nntp.c @@ -1,106 +1,106 @@ ---- nntp.c.orig Thu Jul 23 12:03:11 1998 -+++ nntp.c Thu Jan 27 17:19:01 2005 -@@ -20,6 +20,7 @@ - - char *header; - #define MAXBUFSIZE 500 +--- nntp.c.orig 2016-06-20 15:59:53 UTC ++++ nntp.c +@@ -20,6 +20,7 @@ extern FILE *rcfp, *rctmpfp, *socket_fp[ + + char *header; + #define MAXBUFSIZE 500 +#define GROUP_FMT "%99s" - char command_buf[MAXBUFSIZE+1]; - - readNNTPdata() -@@ -33,7 +34,7 @@ - { - /* dummy read to flush input */ - readNNTPdata(); -- fprintf(socket_fp[0],"MODE READER\n"); -+ fprintf(socket_fp[0],"MODE READER\r\n"); - readNNTPdata(); - return(get_error(command_buf)); - } -@@ -140,7 +141,8 @@ - else - fprintf(rctmpfp,"%s",command_buf); - } -- items_read=sscanf(command_buf,"%s %d %d", group, &first_article, &max_article); -+ items_read=sscanf(command_buf,GROUP_FMT "%d %d", group, &first_article, &max_article); -+ group[sizeof(group)-1] = '\0'; - if(items_read < 2) - return(0); - return(items_read); -@@ -151,7 +153,7 @@ - int first_art, last_art, total_art, tmp ; - - fprintf(stderr,"%s: ",group); -- fprintf(socket_fp[0],"GROUP %s\n",group); -+ fprintf(socket_fp[0],"GROUP %s\r\n",group); - readNNTPdata(); - - #ifdef DEBUG -@@ -180,7 +182,7 @@ - first_article = last_art - max_article + 1; - } - -- fprintf(socket_fp[0],"STAT %d\n",first_article); -+ fprintf(socket_fp[0],"STAT %d\r\n",first_article); - readNNTPdata(); - - while(!get_error1(command_buf)) -@@ -196,7 +198,7 @@ - return(0); - } - -- fprintf(socket_fp[0],"STAT %d\n",first_article); -+ fprintf(socket_fp[0],"STAT %d\r\n",first_article); - readNNTPdata(); - } - fprintf(stderr,"articles %d to %d\n",first_article,last_art); -@@ -256,7 +258,7 @@ - fprintf(stderr," %c",0xd); - } - -- fprintf(socket_fp[0],"ARTICLE\n"); -+ fprintf(socket_fp[0],"ARTICLE\r\n"); - readNNTPdata(); - if(!get_error(command_buf)) - return(0); -@@ -275,7 +277,7 @@ - } - - /* Make it little fast */ -- fprintf(socket_fp[0],"NEXT\n"); -+ fprintf(socket_fp[0],"NEXT\r\n"); - - article_fetching=1; - -@@ -329,17 +331,19 @@ - char groupname[100]; - - fprintf(stderr, "\nList of NewsGroups:\n"); -- fprintf(socket_fp[0],"LIST\n"); -+ fprintf(socket_fp[0],"LIST\r\n"); - readNNTPdata(); - if(!get_error2(command_buf)) - exit(1); - readNNTPdata(); -- sscanf(command_buf,"%s",groupname); -+ sscanf(command_buf,GROUP_FMT,groupname); -+ groupname[sizeof(groupname)-1] = '\0'; - while(command_buf[0] != '.' || command_buf[1] != 13 )/*|| command_buf[1] != 10)*/ - { - fprintf(stderr,"%s\n",groupname); - readNNTPdata(); -- sscanf(command_buf,"%s",groupname); -+ sscanf(command_buf,GROUP_FMT,groupname); -+ groupname[sizeof(groupname)-1] = '\0'; - } - exit(1); - -@@ -348,7 +352,7 @@ - sendQuit() - { - -- fprintf(socket_fp[0],"QUIT\n"); -+ fprintf(socket_fp[0],"QUIT\r\n"); - readNNTPdata(); - } - + char command_buf[MAXBUFSIZE+1]; + + readNNTPdata() +@@ -33,7 +34,7 @@ setReaderMode() + { + /* dummy read to flush input */ + readNNTPdata(); +- fprintf(socket_fp[0],"MODE READER\n"); ++ fprintf(socket_fp[0],"MODE READER\r\n"); + readNNTPdata(); + return(get_error(command_buf)); + } +@@ -140,7 +141,8 @@ while(comment) + else + fprintf(rctmpfp,"%s",command_buf); + } +- items_read=sscanf(command_buf,"%s %d %d", group, &first_article, &max_article); ++ items_read=sscanf(command_buf,GROUP_FMT "%d %d", group, &first_article, &max_article); ++ group[sizeof(group)-1] = '\0'; + if(items_read < 2) + return(0); + return(items_read); +@@ -151,7 +153,7 @@ checkGroup() + int first_art, last_art, total_art, tmp ; + + fprintf(stderr,"%s: ",group); +- fprintf(socket_fp[0],"GROUP %s\n",group); ++ fprintf(socket_fp[0],"GROUP %s\r\n",group); + readNNTPdata(); + + #ifdef DEBUG +@@ -180,7 +182,7 @@ int first_art, last_art, total_art, tmp + first_article = last_art - max_article + 1; + } + +- fprintf(socket_fp[0],"STAT %d\n",first_article); ++ fprintf(socket_fp[0],"STAT %d\r\n",first_article); + readNNTPdata(); + + while(!get_error1(command_buf)) +@@ -196,7 +198,7 @@ int first_art, last_art, total_art, tmp + return(0); + } + +- fprintf(socket_fp[0],"STAT %d\n",first_article); ++ fprintf(socket_fp[0],"STAT %d\r\n",first_article); + readNNTPdata(); + } + fprintf(stderr,"articles %d to %d\n",first_article,last_art); +@@ -256,7 +258,7 @@ int check_header = 1; + fprintf(stderr," %c",0xd); + } + +- fprintf(socket_fp[0],"ARTICLE\n"); ++ fprintf(socket_fp[0],"ARTICLE\r\n"); + readNNTPdata(); + if(!get_error(command_buf)) + return(0); +@@ -275,7 +277,7 @@ int check_header = 1; + } + + /* Make it little fast */ +- fprintf(socket_fp[0],"NEXT\n"); ++ fprintf(socket_fp[0],"NEXT\r\n"); + + article_fetching=1; + +@@ -329,17 +331,19 @@ getGroupList() + char groupname[100]; + + fprintf(stderr, "\nList of NewsGroups:\n"); +- fprintf(socket_fp[0],"LIST\n"); ++ fprintf(socket_fp[0],"LIST\r\n"); + readNNTPdata(); + if(!get_error2(command_buf)) + exit(1); + readNNTPdata(); +- sscanf(command_buf,"%s",groupname); ++ sscanf(command_buf,GROUP_FMT,groupname); ++ groupname[sizeof(groupname)-1] = '\0'; + while(command_buf[0] != '.' || command_buf[1] != 13 )/*|| command_buf[1] != 10)*/ + { + fprintf(stderr,"%s\n",groupname); + readNNTPdata(); +- sscanf(command_buf,"%s",groupname); ++ sscanf(command_buf,GROUP_FMT,groupname); ++ groupname[sizeof(groupname)-1] = '\0'; + } + exit(1); + +@@ -348,7 +352,7 @@ exit(1); + sendQuit() + { + +- fprintf(socket_fp[0],"QUIT\n"); ++ fprintf(socket_fp[0],"QUIT\r\n"); + readNNTPdata(); + } + diff --git a/news/newsfetch/files/patch-opt.c b/news/newsfetch/files/patch-opt.c index a07d560b8083..05111da7b65c 100644 --- a/news/newsfetch/files/patch-opt.c +++ b/news/newsfetch/files/patch-opt.c @@ -1,13 +1,13 @@ ---- opt.c.orig Wed Nov 19 19:01:47 2003 -+++ opt.c Wed Nov 19 19:01:47 2003 -@@ -192,8 +192,8 @@ +--- opt.c.orig 2016-06-20 15:59:53 UTC ++++ opt.c +@@ -192,8 +192,8 @@ opt_help(char *prog_name) { char *options= -" [-clsyvV] [-d dirname] [-f rcfile] [-t N] - [-T timeout] [-w M ] [-pPY filter] [-x command] +" [-clsyvV] [-d dirname] [-f rcfile] [-t N]\n\ + [-T timeout] [-w M ] [-pPY filter] [-x command]\n\ "; fprintf(stderr,"Usage: %s nntp_server [options]\n", prog_name); fprintf(stderr,"Options:\n%s\n",options); diff --git a/news/newsfetch/files/patch-util.c b/news/newsfetch/files/patch-util.c index b90dc048e2d9..fc262b6c09ac 100644 --- a/news/newsfetch/files/patch-util.c +++ b/news/newsfetch/files/patch-util.c @@ -1,27 +1,27 @@ ---- util.c.orig Wed Nov 19 19:01:47 2003 -+++ util.c Wed Nov 19 19:01:47 2003 -@@ -61,15 +61,15 @@ +--- util.c.orig 2016-06-20 15:59:53 UTC ++++ util.c +@@ -61,15 +61,15 @@ generateProcmailrc(char *homedir, char * FILE *fp, *fp1, *fp2; char *tmp, buf[200], group[180], filterfile[100], procmailrcfile[100]; int i,j; -char *title=" - -############### Generated by Newsfetch ############################## -# New version of Newsfetch is available from # -# # -# http://ulf.wep.net/newsfetch.html # -# Feedback and Comments to Yusuf Motiwala # -###################################################################### - +char *title="\n\ +\n\ +############### Generated by Newsfetch ##############################\n\ +# New version of Newsfetch is available from #\n\ +# #\n\ +# http://ulf.wep.net/newsfetch.html #\n\ +# Feedback and Comments to Yusuf Motiwala #\n\ +######################################################################\n\ +\n\ "; strcpy(filterfile,homedir); diff --git a/print/panda/Makefile b/print/panda/Makefile index 7dba2a6d7a1d..574b0b5e99d3 100644 --- a/print/panda/Makefile +++ b/print/panda/Makefile @@ -1,44 +1,45 @@ # Created by: Akinori MUSHA aka knu # $FreeBSD$ PORTNAME= panda PORTVERSION= 0.5.4 PORTREVISION= 9 CATEGORIES= print MASTER_SITES= SF \ SAVANNAH \ http://www.stillhq.com/panda/source/ MAINTAINER= ports@FreeBSD.org COMMENT= PDF generation library LICENSE= GPLv2 LGPL21 LICENSE_COMB= dual LIB_DEPENDS= libpng.so:graphics/png \ libtiff.so:graphics/tiff GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-berkeley-db CPPFLAGS+= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include LIBS+= -L${BDB_LIB_DIR} -L${LOCALBASE}/lib INSTALL_TARGET= install-strip -USES= autoreconf gmake jpeg libtool pathfix pkgconfig tar:bzip2 +USES= autoreconf dos2unix gmake jpeg libtool pathfix pkgconfig tar:bzip2 +DOS2UNIX_GLOB= *.c PATHFIX_MAKEFILEIN= Makefile.am USE_BDB= yes USE_LDCONFIG= yes OPTIONS_DEFINE= DOCS EXAMPLES post-install: ${INSTALL_MAN} ${WRKSRC}/man/panda_*.3 ${STAGEDIR}${MANPREFIX}/man/man3 @${MKDIR} ${STAGEDIR}${DOCSDIR} .for f in AUTHORS CONTRIBUTORS ChangeLog DEV-HINTS README TODO UNDERWAY ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} .endfor @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} .for f in IMAGES examples/*.c examples/c++/*.cpp examples/images/*.* ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${EXAMPLESDIR} .endfor .include diff --git a/print/panda/files/patch-configure.in b/print/panda/files/patch-configure.in index bf1cae63c46b..a214417d1376 100644 --- a/print/panda/files/patch-configure.in +++ b/print/panda/files/patch-configure.in @@ -1,26 +1,26 @@ --- configure.in.orig 2004-04-13 00:46:24 UTC +++ configure.in -@@ -28,7 +28,7 @@ +@@ -28,7 +28,7 @@ dnl -ldmalloc: dnl AC_CHECK_LIB(dmalloc, malloc) dnl -lpng:: -AC_CHECK_LIB(png, png_libpng_ver, CFLAGS="$CFLAGS -DHAVE_LIBPNG" LDFLAGS="$LDFLAGS -lpng" ) +AC_CHECK_LIB(png, png_get_libpng_ver, CFLAGS="$CFLAGS -DHAVE_LIBPNG" LDFLAGS="$LDFLAGS -lpng" ) dnl -ltiff: AC_CHECK_LIB(tiff, TIFFOpen, CFLAGS="$CFLAGS -DHAVE_LIBTIFF" LDFLAGS="$LDFLAGS -ltiff") -@@ -52,12 +52,12 @@ +@@ -52,12 +52,12 @@ else if test "z$DATABASE" = "zedb"; then AC_CHECK_LIB(edb, e_db_open, [LDFLAGS="$LDFLAGS -ledb" DATABASE="edb" AC_DEFINE([USE_EDB], [], [Use Edb])], - [AC_MSG_RESULT([not found]), + [AC_MSG_RESULT([not found]) AC_MSG_ERROR([please reinstall the Edb distribution])]) elif test "z$DATABASE" = "zdb"; then AC_CHECK_LIB(db, db_create, [LDFLAGS="$LDFLAGS -ldb" DATABASE="db" AC_DEFINE([USE_DB], [], [Use Berkeley DB])], - [AC_MSG_RESULT([not found]), + [AC_MSG_RESULT([not found]) AC_MSG_ERROR([please reinstall the Berkeley DB distribution])]) fi fi diff --git a/print/panda/files/patch-database.c b/print/panda/files/patch-database.c index 6c51db16365b..ec1f7057674d 100644 --- a/print/panda/files/patch-database.c +++ b/print/panda/files/patch-database.c @@ -1,29 +1,29 @@ ---- ./database.c.orig 2004-04-13 02:46:24.000000000 +0200 -+++ ./database.c 2014-08-15 19:09:39.000000000 +0200 -@@ -160,6 +160,12 @@ +--- database.c.orig 2016-06-20 16:04:03 UTC ++++ database.c +@@ -160,6 +160,12 @@ panda_dbwrite (panda_pdf * document, cha panda_windbwrite (document, key, value); #else +#ifdef USE_EDB + e_db_data_set((E_DB_File *)document->db, key, value, strlen(value)+1); +#else + DBT db_key, db_data; + int ec; + #if defined DEBUG printf ("Storing (%s, %s) in 0x%08x\n", key, value, document->db); #endif -@@ -169,13 +175,6 @@ +@@ -169,13 +175,6 @@ panda_dbwrite (panda_pdf * document, cha if (value == NULL) panda_error (panda_true, "Cannot store null value\n"); -#ifdef USE_EDB - - e_db_data_set((E_DB_File *)document->db, key, value, strlen(value)+1); -#else - DBT db_key, db_data; - int ec; - memset(&db_key, 0, sizeof(db_key)); memset(&db_data, 0, sizeof(db_data)); db_key.data = key; diff --git a/print/panda/files/patch-images.c b/print/panda/files/patch-images.c index 9091205519c0..ed5cfbbf68e7 100644 --- a/print/panda/files/patch-images.c +++ b/print/panda/files/patch-images.c @@ -1,38 +1,38 @@ ---- ./images.c.orig 2004-04-13 02:46:24.000000000 +0200 -+++ ./images.c 2014-08-15 19:11:07.000000000 +0200 -@@ -835,7 +835,7 @@ +--- images.c.orig 2016-06-20 16:04:03 UTC ++++ images.c +@@ -835,7 +835,7 @@ panda_insertPNG (panda_pdf * output, pan panda_object * imageObj, char *filename) { FILE *image; - unsigned long width, height; + png_uint_32 width, height; int bitdepth, colourtype, outColourType; png_uint_32 i, rowbytes; png_structp png; -@@ -854,7 +854,7 @@ +@@ -854,7 +854,7 @@ panda_insertPNG (panda_pdf * output, pan // Check that it really is a PNG file fread (sig, 1, 8, image); - if (!png_check_sig (sig, 8)) + if (png_sig_cmp (sig, 0, 8)) panda_error (panda_true, "PNG file was invalid"); // Start decompressing -@@ -1399,7 +1399,7 @@ +@@ -1399,7 +1399,7 @@ void panda_imagesizePNG (int *width, int *height, char *filename) { FILE * image; - unsigned long pwidth, pheight; + png_uint_32 pwidth, pheight; int bitdepth, colourtype; png_structp png; png_infop info; -@@ -1411,7 +1411,7 @@ +@@ -1411,7 +1411,7 @@ panda_imagesizePNG (int *width, int *hei // Check that it really is a PNG file fread (sig, 1, 8, image); - if (!png_check_sig (sig, 8)) + if (png_sig_cmp (sig, 0, 8)) panda_error (panda_true, "PNG file was invalid"); // Start decompressing diff --git a/print/panda/files/patch-objects.c b/print/panda/files/patch-objects.c index af5273fb8915..827842396e69 100644 --- a/print/panda/files/patch-objects.c +++ b/print/panda/files/patch-objects.c @@ -1,11 +1,11 @@ ---- ./objects.c.orig 2004-04-13 02:46:24.000000000 +0200 -+++ ./objects.c 2014-08-15 19:09:39.000000000 +0200 -@@ -99,7 +99,7 @@ +--- objects.c.orig 2016-06-20 16:04:03 UTC ++++ objects.c +@@ -99,7 +99,7 @@ panda_newobject (panda_pdf * doc, int ty created->children = (panda_child *) panda_xmalloc (sizeof (panda_child)); ((panda_child *) created->children)->next = NULL; - (panda_child *) created->cachedLastChild = NULL; + created->cachedLastChild = NULL; // By default this object is not a pages object created->isPages = panda_false; diff --git a/print/panda/files/patch-utility.c b/print/panda/files/patch-utility.c index c37cb02f288e..12064c916ace 100644 --- a/print/panda/files/patch-utility.c +++ b/print/panda/files/patch-utility.c @@ -1,25 +1,25 @@ --- ./utility.c.orig 2004-04-13 02:46:24.000000000 +0200 +++ ./utility.c 2014-08-15 19:13:36.000000000 +0200 @@ -509,7 +509,7 @@ char *output; length = strlen (input); - output = panda_xmalloc ((length + 1) * sizeof (char)); + output = panda_xmalloc ((length*2 + 1) * sizeof (char)); - + // todo_mikal: not sure I like the windows version of this code for (count = 0; count < length; count++) @@ -518,11 +518,11 @@ sprintf (output[count], "%2x", input[count]); - + #else /* */ - snprintf (output[count], 1, "%2x", input[count]); + sprintf (output+count*2, "%2x", input[count]); - + #endif } - output[length + 1] = 0; + output[length*2] = 0; return output; } diff --git a/security/dcetest/Makefile b/security/dcetest/Makefile index aa52beb75753..46d9cf209b7e 100644 --- a/security/dcetest/Makefile +++ b/security/dcetest/Makefile @@ -1,21 +1,24 @@ # Created by: Yonatan # $FreeBSD$ PORTNAME= dcetest PORTVERSION= 1.2 CATEGORIES= security MASTER_SITES= PACKETSTORM/UNIX/scanners MAINTAINER= onatan@gmail.com COMMENT= Utility to dump MSRPC endpoint information from Windows systems +USES= dos2unix +DOS2UNIX_GLOB= *.c + ALL_TARGET= dcetest MAKE_ARGS= CC="${CC}" WRKSRC= ${WRKDIR}/${PORTNAME} PLIST_FILES= bin/dcetest do-install: ${INSTALL_PROGRAM} ${WRKSRC}/dcetest ${STAGEDIR}${PREFIX}/bin .include diff --git a/security/dcetest/files/patch-Makefile b/security/dcetest/files/patch-Makefile index 9a12138dcf38..30349d5cd210 100644 --- a/security/dcetest/files/patch-Makefile +++ b/security/dcetest/files/patch-Makefile @@ -1,10 +1,10 @@ ---- Makefile.orig Sat Jan 11 06:22:46 2003 -+++ Makefile Sat Jan 11 06:23:10 2003 +--- Makefile.orig 2001-08-20 20:40:40 UTC ++++ Makefile @@ -1,6 +1,6 @@ .SUFFIXES: .a .o .c CC = gcc -CFLAGS = -Wall -funsigned-char -c -fPIC -ggdb +CFLAGS += -Wall -funsigned-char -c -fPIC -ggdb BINS = dcetest ALL = $(BINS) diff --git a/security/dcetest/files/patch-dcetest.c b/security/dcetest/files/patch-dcetest.c index 23347da6137d..d5bc9b507c0e 100644 --- a/security/dcetest/files/patch-dcetest.c +++ b/security/dcetest/files/patch-dcetest.c @@ -1,11 +1,11 @@ ---- dcetest.c.orig Tue Feb 15 11:32:36 2005 -+++ dcetest.c Tue Feb 15 11:31:48 2005 -@@ -359,7 +359,7 @@ - int tint; - char annotation[EPT_MAX_ANNOTATION_SIZE+1]; - int floor, floors; -- int address_type; -+ int address_type=0; - - char tmp_address[200]; - char tmp_address2[200]; +--- dcetest.c.orig 2016-06-20 15:23:56 UTC ++++ dcetest.c +@@ -359,7 +359,7 @@ dce_parse_enum_response(const unsigned c + int tint; + char annotation[EPT_MAX_ANNOTATION_SIZE+1]; + int floor, floors; +- int address_type; ++ int address_type=0; + + char tmp_address[200]; + char tmp_address2[200]; diff --git a/security/dcetest/files/patch-tcpstuff.c b/security/dcetest/files/patch-tcpstuff.c index d05de6c8575b..4abe4a655478 100644 --- a/security/dcetest/files/patch-tcpstuff.c +++ b/security/dcetest/files/patch-tcpstuff.c @@ -1,32 +1,32 @@ ---- tcpstuff.c.orig Sat Jan 11 06:46:08 2003 -+++ tcpstuff.c Sat Jan 11 06:50:59 2003 -@@ -229,6 +229,7 @@ +--- tcpstuff.c.orig 2016-06-20 15:23:56 UTC ++++ tcpstuff.c +@@ -229,6 +229,7 @@ make_tcp_listener(unsigned short localpo /* this function takes in a listenFd and returns an acceptedFd */ +/* This is not used and gives a security warning in FreeBSD ports int tcp_accept(int listenFd) { -@@ -242,12 +243,14 @@ +@@ -242,12 +243,14 @@ tcp_accept(int listenFd) (struct sockaddr *)&clientAddr, &addrLen)) < 0) { +*/ /* This is always an error, looping or not */ +/* return -1; } - +*/ /* Set the "don't linger on close" option */ - +/* lingerVal.l_onoff = 0; lingerVal.l_linger = 0; if (setsockopt(clientFd, SOL_SOCKET, SO_LINGER, -@@ -260,3 +263,4 @@ +@@ -260,3 +263,4 @@ tcp_accept(int listenFd) return(clientFd); } +*/ diff --git a/security/dcetest/files/patch-tcpstuff.h b/security/dcetest/files/patch-tcpstuff.h index 165719123746..152ac0e6d1fb 100644 --- a/security/dcetest/files/patch-tcpstuff.h +++ b/security/dcetest/files/patch-tcpstuff.h @@ -1,10 +1,10 @@ ---- tcpstuff.h.orig Sat Jan 11 06:48:15 2003 -+++ tcpstuff.h Sat Jan 11 06:48:54 2003 -@@ -42,5 +42,7 @@ +--- tcpstuff.h.orig 2001-08-20 20:29:56 UTC ++++ tcpstuff.h +@@ -42,5 +42,7 @@ make_tcp_listener(unsigned short localpo int write_uint32(int fd,uint32 data); +/* This is not used and gives a warning in FreeBSD's ports system int tcp_accept(int listenFd); +*/ diff --git a/security/iaikpkcs11wrapper/Makefile b/security/iaikpkcs11wrapper/Makefile index 27efc672eacc..ba5a1e7d72e3 100644 --- a/security/iaikpkcs11wrapper/Makefile +++ b/security/iaikpkcs11wrapper/Makefile @@ -1,57 +1,58 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= iaikPkcs11Wrapper PORTVERSION= 1.2.18 CATEGORIES= security java devel MASTER_SITES= LOCAL/ale DISTNAME= ${PORTNAME}_${PORTVERSION:S/./_/g} MAINTAINER= ale@FreeBSD.org COMMENT= PKCS\#11 Java wrapper OPTIONS_DEFINE= DOCS EXAMPLES USES= dos2unix gmake zip USE_JAVA= yes -DOS2UNIX_FILES= Makefile +DOS2UNIX_GLOB= Makefile *.c +DOS2UNIX_WRKSRC= ${WRKDIR}/src/native JAVA_VERSION= 1.6+ JAVA_OS= native ALL_TARGET= release -PLIST_FILES= lib/libpkcs11wrapper.so %%JAVAJARDIR%%/iaikPkcs11Wrapper.jar +PLIST_FILES= lib/libpkcs11wrapper.so ${JAVAJARDIR}/iaikPkcs11Wrapper.jar PORTDOCS= * PORTEXAMPLES= * .include .if ${ARCH} == "amd64" || ${ARCH} == "ia64" WRKSRC= ${WRKDIR}/src/native/unix/linux-x86_64 .else WRKSRC= ${WRKDIR}/src/native/unix/linux-x86 .endif do-install: @${ECHO_MSG} -n ">> Installing JNI library in ${PREFIX}/lib..." @${INSTALL_PROGRAM} ${WRKSRC}/release/libpkcs11wrapper.so ${STAGEDIR}${PREFIX}/lib/ @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/iaikPkcs11Wrapper.jar..." @${INSTALL_DATA} ${WRKDIR}/bin/iaikPkcs11Wrapper.jar ${STAGEDIR}${JAVAJARDIR}/ @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} @cd ${WRKDIR}/docs && ${FIND} * | \ ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR} > /dev/null 2>&1 @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Installing examples in ${EXAMPLESDIR}..." .endif .if ${PORT_OPTIONS:MEXAMPLES} @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} @cd ${WRKDIR}/examples && ${FIND} * | \ ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${EXAMPLESDIR} > /dev/null 2>&1 @${ECHO_MSG} " [ DONE ]" .endif .include diff --git a/security/iaikpkcs11wrapper/files/patch-Makefile b/security/iaikpkcs11wrapper/files/patch-Makefile index 1fbed912d449..83168fe0d96b 100644 --- a/security/iaikpkcs11wrapper/files/patch-Makefile +++ b/security/iaikpkcs11wrapper/files/patch-Makefile @@ -1,7 +1,7 @@ ---- Makefile.orig 2013-10-30 08:34:48.105849638 +0000 -+++ Makefile 2013-10-30 08:35:06.293848426 +0000 +--- Makefile.orig 2016-06-20 15:16:34 UTC ++++ Makefile @@ -1,4 +1,3 @@ -CC = gcc SOURCE_DIR = ../../common/ PLATFORM_SRC_INCLUDE = ../src/ DEBUG_OUTPUT_DIR = debug/ diff --git a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c index bbf6cb1dc775..ae78b05f0565 100644 --- a/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c +++ b/security/iaikpkcs11wrapper/files/patch-native_src_pkcs11wrapper.c @@ -1,44 +1,44 @@ ---- ../../common/pkcs11wrapper.c.orig 2011-11-03 12:15:18.000000000 +0100 -+++ ../../common/pkcs11wrapper.c 2011-11-13 21:55:57.000000000 +0100 -@@ -1258,6 +1258,7 @@ - jobject jAttribute; - CK_RV rv; - CK_ULONG error = 0; -+ CK_BBOOL array = FALSE; - ModuleData *moduleData; - CK_FUNCTION_LIST_PTR ckpFunctions; - -@@ -1328,9 +1329,11 @@ - for (j=0; jC_GetAttributeValue)(ckSessionHandle, ckObjectHandle, ckpAttributes, ckAttributesLength); - if(ckAssertReturnValueOK(env, rv, __FUNCTION__) != CK_ASSERT_OK) { -@@ -1343,6 +1346,7 @@ - TRACE0(tag_call, __FUNCTION__, "exiting "); - return ; - } -+ } - - /* now, the ulValueLength field of each attribute should hold the exact buffer length needed - * to allocate the needed buffers accordingly -@@ -4474,11 +4478,12 @@ - jpTemp = (jchar*) malloc((*ckpLength) * sizeof(jchar)); - if (jpTemp == NULL && (*ckpLength)!=0) { *ckpArray = NULL_PTR; throwOutOfMemoryError(env); return 1; } - (*env)->GetCharArrayRegion(env, jArray, 0, *ckpLength, jpTemp); -- *ckpArray = (CK_UTF8CHAR_PTR) malloc (*ckpLength * sizeof(CK_UTF8CHAR)); -+ *ckpArray = (CK_UTF8CHAR_PTR) malloc ((*ckpLength + 1) * sizeof(CK_UTF8CHAR)); - if (*ckpArray == NULL && (*ckpLength)!=0) { free(jpTemp); throwOutOfMemoryError(env); return 2; } - for (i=0; i<(*ckpLength); i++) { - (*ckpArray)[i] = jCharToCKUTF8Char(jpTemp[i]); - } -+ (*ckpArray)[*ckpLength] = NULL_PTR; - free(jpTemp); - return 0; - } +--- ../../common/pkcs11wrapper.c.orig 2016-06-20 15:16:34 UTC ++++ ../../common/pkcs11wrapper.c +@@ -1258,6 +1258,7 @@ JNIEXPORT void JNICALL Java_iaik_pkcs_pk + jobject jAttribute; + CK_RV rv; + CK_ULONG error = 0; ++ CK_BBOOL array = FALSE; + ModuleData *moduleData; + CK_FUNCTION_LIST_PTR ckpFunctions; + +@@ -1328,9 +1329,11 @@ JNIEXPORT void JNICALL Java_iaik_pkcs_pk + for (j=0; jC_GetAttributeValue)(ckSessionHandle, ckObjectHandle, ckpAttributes, ckAttributesLength); + if(ckAssertReturnValueOK(env, rv, __FUNCTION__) != CK_ASSERT_OK) { +@@ -1343,6 +1346,7 @@ JNIEXPORT void JNICALL Java_iaik_pkcs_pk + TRACE0(tag_call, __FUNCTION__, "exiting "); + return ; + } ++ } + + /* now, the ulValueLength field of each attribute should hold the exact buffer length needed + * to allocate the needed buffers accordingly +@@ -4474,11 +4478,12 @@ int jCharArrayToCKUTF8CharArray(JNIEnv * + jpTemp = (jchar*) malloc((*ckpLength) * sizeof(jchar)); + if (jpTemp == NULL && (*ckpLength)!=0) { *ckpArray = NULL_PTR; throwOutOfMemoryError(env); return 1; } + (*env)->GetCharArrayRegion(env, jArray, 0, *ckpLength, jpTemp); +- *ckpArray = (CK_UTF8CHAR_PTR) malloc (*ckpLength * sizeof(CK_UTF8CHAR)); ++ *ckpArray = (CK_UTF8CHAR_PTR) malloc ((*ckpLength + 1) * sizeof(CK_UTF8CHAR)); + if (*ckpArray == NULL && (*ckpLength)!=0) { free(jpTemp); throwOutOfMemoryError(env); return 2; } + for (i=0; i<(*ckpLength); i++) { + (*ckpArray)[i] = jCharToCKUTF8Char(jpTemp[i]); + } ++ (*ckpArray)[*ckpLength] = NULL_PTR; + free(jpTemp); + return 0; + } diff --git a/security/trousers/Makefile b/security/trousers/Makefile index 3b9849efdcc5..40dc05ea3a3f 100644 --- a/security/trousers/Makefile +++ b/security/trousers/Makefile @@ -1,50 +1,49 @@ # Created by: Sebastian Schuetz # $FreeBSD$ PORTNAME= trousers PORTVERSION= 0.3.13 CATEGORIES= security MASTER_SITES= SF MAINTAINER= hrs@FreeBSD.org COMMENT= Open-source TCG Software Stack LICENSE= CPL LICENSE_NAME= Common Public License LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BUILD_DEPENDS= tpm-emulator>=0.7.4_1:emulators/tpm-emulator RUN_DEPENDS:= ${BUILD_DEPENDS} -USES= alias autoreconf gmake iconv libtool pkgconfig +USES= dos2unix alias autoreconf gmake iconv libtool pkgconfig +DOS2UNIX_GLOB= *.h *.c USE_OPENSSL= YES USE_LDCONFIG= YES USE_RC_SUBR= tcsd INSTALL_TARGET= install-strip GNU_CONFIGURE= YES CONFIGURE_ARGS= --with-gui=none --enable-static \ --localstatedir=${PREFIX}/var \ --with-tssuser=${USERS} \ --with-tssgroup=${GROUPS} \ --with-openssl=${OPENSSLBASE} \ RANLIB=: MAKE_ENV= ICONV_LIB=${ICONV_LIB} \ ICONV_PREFIX=${ICONV_PREFIX} SUB_FILES= pkg-message SUB_LIST= USERS="${USERS}" GROUPS="${GROUPS}" PLIST_SUB= USERS="${USERS}" GROUPS="${GROUPS}" USERS= _tss GROUPS= _tss OPTIONS_DEFINE= DEBUG DEBUG_CONFIGURE_ENABLE= debug -.include - post-install: ${INSTALL_DATA} \ ${WRKSRC}/dist/tcsd.conf ${STAGEDIR}${PREFIX}/etc/tcsd.conf.sample ${MKDIR} ${STAGEDIR}${PREFIX}/var/lib/tpm .include diff --git a/security/trousers/files/patch-configure.in b/security/trousers/files/patch-configure.in index 489a28fb5fea..a121c3790eb3 100644 --- a/security/trousers/files/patch-configure.in +++ b/security/trousers/files/patch-configure.in @@ -1,50 +1,50 @@ ---- configure.in.orig 2014-04-25 03:05:43.000000000 +0900 -+++ configure.in 2016-05-19 02:57:32.524179000 +0900 -@@ -52,7 +52,7 @@ +--- configure.in.orig 2014-04-24 18:05:43 UTC ++++ configure.in +@@ -52,7 +52,7 @@ AC_ARG_WITH(openssl, AC_MSG_ERROR([$OPENSSL_INCLUDE_DIR or $OPENSSL_LIB_DIR doen't exist!]) else AC_MSG_RESULT([yes]) - CFLAGS="$CFLAGS -L$OPENSSL_LIB_DIR -I$OPENSSL_INCLUDE_DIR" + AC_SUBST([OPENSSL_INCLUDE_DIR]) AC_SUBST([OPENSSL_LIB_DIR]) fi], [AC_MSG_RESULT([no]) -@@ -72,6 +72,21 @@ +@@ -72,6 +72,21 @@ AC_ARG_ENABLE(gcov, [CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs" AC_MSG_RESULT([*** Enabling gcov at user request ***])],) +# Check for tss user +AC_ARG_WITH(tssuser, + [ --with-tssuser[[=USER]] set tss user [[tss]]], + [tss_user=$withval], + [tss_user=tss] +) +# Check for tss group +AC_ARG_WITH(tssgroup, + [ --with-tssgroup[[=GROUP]] set tss group [[tss]]], + [tss_group=$withval], + [tss_group=tss] +) +AC_SUBST(TSS_USER_NAME, $tss_user) +AC_SUBST(TSS_GROUP_NAME, $tss_group) + # profiling support AC_ARG_ENABLE(gprof, [AC_HELP_STRING([--enable-gprof], [enable profiling with gprof [default=off]])], -@@ -356,6 +371,8 @@ +@@ -356,6 +371,8 @@ AC_PROG_LIBTOOL AC_C_BIGENDIAN([AC_DEFINE(_BIG_ENDIAN, 1, [big-endian host])]) AC_CHECK_DECL(htole32, [AC_DEFINE(HTOLE_DEFINED, 1, [htole32 function is available])]) AC_CHECK_HEADER(sys/byteorder.h, [AC_DEFINE(HAVE_BYTEORDER_H, 1, [sys/byteorder.h header])]) +AC_CHECK_HEADER(endian.h, [AC_DEFINE(HAVE_ENDIAN_H, 1, [endian.h header])]) +AC_CHECK_HEADER(sys/endian.h, [AC_DEFINE(HAVE_SYS_ENDIAN_H, 1, [sys/endian.h header])]) AC_CHECK_FUNC(daemon, [ AC_DEFINE(HAVE_DAEMON, 1, [daemon function is available]) ]) if test "x${GCC}" = "xyes"; then -@@ -363,6 +380,7 @@ +@@ -363,6 +380,7 @@ if test "x${GCC}" = "xyes"; then fi CFLAGS="$CFLAGS -I../include \ + -DTSS_USER_NAME=\\\"$tss_user\\\" -DTSS_GROUP_NAME=\\\"$tss_group\\\" \ -DTCSD_DEFAULT_PORT=${TCSD_DEFAULT_PORT} -DTSS_VER_MAJOR=${TSS_VER_MAJOR} \ -DTSS_VER_MINOR=${TSS_VER_MINOR} -DTSS_SPEC_MAJOR=${TSS_SPEC_MAJOR} \ -DTSS_SPEC_MINOR=${TSS_SPEC_MINOR}" diff --git a/security/trousers/files/patch-dist-Makefile.am b/security/trousers/files/patch-dist_Makefile.am similarity index 100% rename from security/trousers/files/patch-dist-Makefile.am rename to security/trousers/files/patch-dist_Makefile.am diff --git a/security/trousers/files/patch-dist-tcsd.conf.in b/security/trousers/files/patch-dist_tcsd.conf.in similarity index 100% rename from security/trousers/files/patch-dist-tcsd.conf.in rename to security/trousers/files/patch-dist_tcsd.conf.in diff --git a/security/trousers/files/patch-src-include-biosem.h b/security/trousers/files/patch-src_include_biosem.h similarity index 85% rename from security/trousers/files/patch-src-include-biosem.h rename to security/trousers/files/patch-src_include_biosem.h index e19865e4d540..0f8086c4cff5 100644 --- a/security/trousers/files/patch-src-include-biosem.h +++ b/security/trousers/files/patch-src_include_biosem.h @@ -1,11 +1,11 @@ ---- src/include/biosem.h.orig 2014-04-24 18:05:44 UTC +--- src/include/biosem.h.orig 2016-06-20 15:21:26 UTC +++ src/include/biosem.h @@ -26,7 +26,7 @@ typedef struct { UINT32 eventType; BYTE digest[20]; UINT32 eventDataSize; - BYTE event[0];/* (eventSize) bytes of event data follows */ + BYTE event[1];/* (eventSize) bytes of event data follows */ } TCG_PCClientPCREventStruc; #define EVLOG_SOURCE_BIOS 1 diff --git a/security/trousers/files/patch-src-include-linux-tpm.h b/security/trousers/files/patch-src_include_linux_tpm.h similarity index 80% rename from security/trousers/files/patch-src-include-linux-tpm.h rename to security/trousers/files/patch-src_include_linux_tpm.h index 9ecc4cfa2fe2..ae6cd78deb23 100644 --- a/security/trousers/files/patch-src-include-linux-tpm.h +++ b/security/trousers/files/patch-src_include_linux_tpm.h @@ -1,11 +1,11 @@ ---- src/include/linux/tpm.h.orig 2014-04-24 18:05:44 UTC +--- src/include/linux/tpm.h.orig 2016-06-20 15:21:26 UTC +++ src/include/linux/tpm.h @@ -20,6 +20,8 @@ #include #elif (defined (__OpenBSD__) || defined (__FreeBSD__)) #include +#elif (defined (SOLARIS)) +#include #endif /* ioctl commands */ diff --git a/security/trousers/files/patch-src-include-tcs_tsp.h b/security/trousers/files/patch-src_include_tcs__tsp.h similarity index 88% rename from security/trousers/files/patch-src-include-tcs_tsp.h rename to security/trousers/files/patch-src_include_tcs__tsp.h index 4a99f4a7140c..fd8164a7f58c 100644 --- a/security/trousers/files/patch-src-include-tcs_tsp.h +++ b/security/trousers/files/patch-src_include_tcs__tsp.h @@ -1,16 +1,16 @@ ---- src/include/tcs_tsp.h.orig 2014-04-24 18:05:44 UTC +--- src/include/tcs_tsp.h.orig 2016-06-20 15:21:26 UTC +++ src/include/tcs_tsp.h @@ -79,7 +79,13 @@ struct key_disk_cache /* XXX Get rid of this, there's no reason to set an arbitrary limit */ #define MAX_KEY_CHILDREN 10 +#ifndef STRUCTURE_PACKING_ATTRIBUTE +#ifdef __GCC #define STRUCTURE_PACKING_ATTRIBUTE __attribute__((packed)) +#else +#define STRUCTURE_PACKING_ATTRIBUTE /* */ +#endif +#endif #ifdef TSS_DEBUG #define DBG_ASSERT(x) assert(x) diff --git a/security/trousers/files/patch-src-include-tcs_utils.h b/security/trousers/files/patch-src_include_tcs__utils.h similarity index 88% rename from security/trousers/files/patch-src-include-tcs_utils.h rename to security/trousers/files/patch-src_include_tcs__utils.h index d0aa6c1cb0c0..4eee71c78339 100644 --- a/security/trousers/files/patch-src-include-tcs_utils.h +++ b/security/trousers/files/patch-src_include_tcs__utils.h @@ -1,23 +1,23 @@ ---- src/include/tcs_utils.h.orig 2014-04-24 18:05:44 UTC +--- src/include/tcs_utils.h.orig 2016-06-20 15:21:26 UTC +++ src/include/tcs_utils.h @@ -18,6 +18,20 @@ #include "tcs_tsp.h" #include "trousers_types.h" + + +/* + * XXX malloc wrapper + * + * Linux: malloc(0) => '\0' + * *BSD: malloc(0) => invalid to dereference + * + * => so wrap malloc(0) => calloc(1, 16) to create + * a 16Byte array containing '\0' + * + */ +#define malloc(x) ((x) == 0 ? calloc(1, 16) : calloc(1, (x))) + struct key_mem_cache { TCPA_KEY_HANDLE tpm_handle; diff --git a/security/trousers/files/patch-src-include-tcsd.h b/security/trousers/files/patch-src_include_tcsd.h similarity index 95% rename from security/trousers/files/patch-src-include-tcsd.h rename to security/trousers/files/patch-src_include_tcsd.h index 86f62b7a2c8a..6d5943f0a5ce 100644 --- a/security/trousers/files/patch-src-include-tcsd.h +++ b/security/trousers/files/patch-src_include_tcsd.h @@ -1,29 +1,29 @@ ---- src/include/tcsd.h.orig 2014-04-24 18:05:44 UTC +--- src/include/tcsd.h.orig 2016-06-20 15:21:26 UTC +++ src/include/tcsd.h @@ -53,14 +53,22 @@ struct tcsd_config #define TCSD_DEFAULT_CONFIG_FILE ETC_PREFIX "/tcsd.conf" extern char *tcsd_config_file; +#ifndef TSS_USER_NAME #define TSS_USER_NAME "tss" +#endif +#ifndef TSS_GROUP_NAME #define TSS_GROUP_NAME "tss" +#endif + +#ifndef TPM_PREFIX +#define TPM_PREFIX "/lib/tpm" +#endif #define TCSD_DEFAULT_MAX_THREADS 10 -#define TCSD_DEFAULT_SYSTEM_PS_FILE VAR_PREFIX "/lib/tpm/system.data" -#define TCSD_DEFAULT_SYSTEM_PS_DIR VAR_PREFIX "/lib/tpm" -#define TCSD_DEFAULT_FIRMWARE_LOG_FILE "/sys/kernel/security/tpm0/binary_bios_measurements" -#define TCSD_DEFAULT_KERNEL_LOG_FILE "/sys/kernel/security/ima/binary_runtime_measurements" +#define TCSD_DEFAULT_SYSTEM_PS_FILE VAR_PREFIX TPM_PREFIX "/system.data" +#define TCSD_DEFAULT_SYSTEM_PS_DIR VAR_PREFIX TPM_PREFIX +#define TCSD_DEFAULT_FIRMWARE_LOG_FILE "/var/run/tpm/binary_bios_measurements" +#define TCSD_DEFAULT_KERNEL_LOG_FILE "/var/run/ima/binary_runtime_measurements" #define TCSD_DEFAULT_FIRMWARE_PCRS 0x00000000 #define TCSD_DEFAULT_KERNEL_PCRS 0x00000000 #define TCSD_DEFAULT_DISABLE_IPV4 0 diff --git a/security/trousers/files/patch-src-include-tcsd_ops.h b/security/trousers/files/patch-src_include_tcsd__ops.h similarity index 75% rename from security/trousers/files/patch-src-include-tcsd_ops.h rename to security/trousers/files/patch-src_include_tcsd__ops.h index 54fdb60ac2d1..72bc79e976dd 100644 --- a/security/trousers/files/patch-src-include-tcsd_ops.h +++ b/security/trousers/files/patch-src_include_tcsd__ops.h @@ -1,11 +1,11 @@ ---- src/include/tcsd_ops.h.orig 2014-04-24 18:05:44 UTC +--- src/include/tcsd_ops.h.orig 2016-06-20 15:21:26 UTC +++ src/include/tcsd_ops.h @@ -123,7 +123,7 @@ struct tcsd_op { char *name; - int op[]; + int op[20]; }; struct tcsd_op tcsd_op_seal = {"seal", {TCSD_OP_SEAL}}; diff --git a/security/trousers/files/patch-src-include-threads.h b/security/trousers/files/patch-src_include_threads.h similarity index 86% rename from security/trousers/files/patch-src-include-threads.h rename to security/trousers/files/patch-src_include_threads.h index f0949695be3a..feeb1b0e8795 100644 --- a/security/trousers/files/patch-src-include-threads.h +++ b/security/trousers/files/patch-src_include_threads.h @@ -1,11 +1,11 @@ ---- src/include/threads.h.orig 2014-04-24 18:05:44 UTC +--- src/include/threads.h.orig 2016-06-20 15:21:26 UTC +++ src/include/threads.h @@ -31,7 +31,7 @@ #define COND_SIGNAL(c) pthread_cond_signal(c) /* thread abstractions */ -#define THREAD_ID ((THREAD_TYPE)pthread_self()) +#define THREAD_ID (long int)((THREAD_TYPE)pthread_self()) #define THREAD_TYPE pthread_t #define THREAD_JOIN pthread_join #define THREAD_DETACH pthread_detach diff --git a/security/trousers/files/patch-src-include-trousers_types.h b/security/trousers/files/patch-src_include_trousers__types.h similarity index 94% rename from security/trousers/files/patch-src-include-trousers_types.h rename to security/trousers/files/patch-src_include_trousers__types.h index 902bea8de528..147d7097af9f 100644 --- a/security/trousers/files/patch-src-include-trousers_types.h +++ b/security/trousers/files/patch-src_include_trousers__types.h @@ -1,42 +1,42 @@ ---- src/include/trousers_types.h.orig 2014-04-24 18:05:44 UTC +--- src/include/trousers_types.h.orig 2016-06-20 15:21:26 UTC +++ src/include/trousers_types.h @@ -11,6 +11,14 @@ #ifndef _TROUSERS_TYPES_H_ #define _TROUSERS_TYPES_H_ +#ifndef STRUCTURE_PACKING_ATTRIBUTE +#ifdef __GCC +#define STRUCTURE_PACKING_ATTRIBUTE __attribute__((packed)) +#else +#define STRUCTURE_PACKING_ATTRIBUTE /* */ +#endif +#endif + #define TCPA_NONCE_SIZE sizeof(TCPA_NONCE) #define TCPA_DIGEST_SIZE sizeof(TCPA_DIGEST) #define TCPA_ENCAUTH_SIZE sizeof(TCPA_ENCAUTH) @@ -100,7 +108,7 @@ typedef struct tdTSS_KEY11_HDR { typedef struct tdTSS_KEY12_HDR { TPM_STRUCTURE_TAG tag; UINT16 fill; -} __attribute__((packed)) TSS_KEY12_HDR; +} STRUCTURE_PACKING_ATTRIBUTE TSS_KEY12_HDR; typedef struct tdTSS_KEY { union { @@ -118,11 +126,10 @@ typedef struct tdTSS_KEY { BYTE *encData; } TSS_KEY; -#if (defined (__linux) || defined (linux) || defined (SOLARIS) || defined (__GLIBC__)) -#define BSD_CONST -#elif (defined (__OpenBSD__) || defined (__FreeBSD__)) +#if defined (__FreeBSD__) #define BSD_CONST const -#endif - +#else +#define BSD_CONST /* */ +#endif #endif diff --git a/security/trousers/files/patch-src-include-tss-platform.h b/security/trousers/files/patch-src_include_tss_platform.h similarity index 84% rename from security/trousers/files/patch-src-include-tss-platform.h rename to security/trousers/files/patch-src_include_tss_platform.h index f9fcd406a650..67273bc34cc5 100644 --- a/security/trousers/files/patch-src-include-tss-platform.h +++ b/security/trousers/files/patch-src_include_tss_platform.h @@ -1,11 +1,11 @@ ---- src/include/tss/platform.h.orig 2014-04-24 18:05:44 UTC +--- src/include/tss/platform.h.orig 2016-06-20 15:21:26 UTC +++ src/include/tss/platform.h @@ -15,7 +15,7 @@ There are platform dependent and general - #if !defined(WIN32) - #include - typedef uint8_t BYTE; -- typedef int8_t TSS_BOOL; -+ typedef uint8_t TSS_BOOL; - typedef uint16_t UINT16; - typedef uint32_t UINT32; - typedef uint64_t UINT64; + #if !defined(WIN32) + #include + typedef uint8_t BYTE; +- typedef int8_t TSS_BOOL; ++ typedef uint8_t TSS_BOOL; + typedef uint16_t UINT16; + typedef uint32_t UINT32; + typedef uint64_t UINT64; diff --git a/security/trousers/files/patch-src-tcs-Makefile.am b/security/trousers/files/patch-src_tcs_Makefile.am similarity index 97% rename from security/trousers/files/patch-src-tcs-Makefile.am rename to security/trousers/files/patch-src_tcs_Makefile.am index c9ff1d9cb775..637037d3a9f3 100644 --- a/security/trousers/files/patch-src-tcs-Makefile.am +++ b/security/trousers/files/patch-src_tcs_Makefile.am @@ -1,166 +1,166 @@ ---- src/tcs/Makefile.am.orig 2014-04-25 03:05:44.000000000 +0900 -+++ src/tcs/Makefile.am 2016-05-19 15:26:50.732611000 +0900 +--- src/tcs/Makefile.am.orig 2014-04-24 18:05:44 UTC ++++ src/tcs/Makefile.am @@ -1,8 +1,7 @@ -noinst_LIBRARIES=libtcs.a +noinst_LIBRARIES=libtcs.a libtcs_emu.a -CFLAGS+=-I${top_srcdir}/src/include libtcs_a_LIBADD=${top_builddir}/src/tddl/libtddl.a -libtcs_a_CFLAGS=-DAPPID=\"TCSD\ TCS\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -fPIE -DPIE +libtcs_a_CFLAGS=-I${top_srcdir}/src/include -DAPPID=\"TCSD\ TCS\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -fPIE -DPIE libtcs_a_SOURCES=log.c \ tcs_caps.c \ -@@ -91,7 +90,7 @@ +@@ -91,7 +90,7 @@ endif if TSS_BUILD_KEY libtcs_a_SOURCES+=tcsi_key.c tcs_key.c tcs_key_mem_cache.c tcs_context_key.c rpc/@RPC@/rpc_key.c \ crypto/@CRYPTO_PACKAGE@/crypto.c -libtcs_a_CFLAGS+=-DTSS_BUILD_KEY +libtcs_a_CFLAGS+=-DTSS_BUILD_KEY -I@OPENSSL_INCLUDE_DIR@ endif if TSS_BUILD_MAINT libtcs_a_SOURCES+=tcsi_maint.c rpc/@RPC@/rpc_maint.c -@@ -140,3 +139,143 @@ +@@ -140,3 +139,143 @@ if TSS_BUILD_CMK libtcs_a_SOURCES+=tcsi_cmk.c rpc/@RPC@/rpc_cmk.c libtcs_a_CFLAGS+=-DTSS_BUILD_CMK endif + +libtcs_emu_a_LIBADD=${LOCALBASE}/lib/tddl_emu/libtddl.a +libtcs_emu_a_CFLAGS=-I${top_srcdir}/src/include -DAPPID=\"TCSD\ TCS\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -fPIE -DPIE + +libtcs_emu_a_SOURCES=log.c \ + tcs_caps.c \ + tcs_req_mgr.c \ + tcs_context.c \ + tcsi_context.c \ + tcs_utils.c \ + rpc/@RPC@/rpc.c rpc/@RPC@/rpc_context.c \ + tcsi_caps_tpm.c rpc/@RPC@/rpc_caps_tpm.c \ + tcs_auth_mgr.c tcsi_auth.c rpc/@RPC@/rpc_auth.c \ + tcs_pbg.c + +if TSS_BUILD_TRANSPORT +libtcs_emu_a_SOURCES+=tcsi_transport.c rpc/@RPC@/rpc_transport.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_TRANSPORT +endif +if TSS_BUILD_TICK +libtcs_emu_a_SOURCES+=tcsi_tick.c rpc/@RPC@/rpc_tick.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_TICK +endif +if TSS_BUILD_COUNTER +libtcs_emu_a_SOURCES+=tcsi_counter.c tcs_counter.c rpc/@RPC@/rpc_counter.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_COUNTER +endif +if TSS_BUILD_RANDOM +libtcs_emu_a_SOURCES+=tcsi_random.c rpc/@RPC@/rpc_random.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_RANDOM +endif +if TSS_BUILD_CAPS +libtcs_emu_a_SOURCES+=tcsi_caps.c rpc/@RPC@/rpc_caps.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_CAPS +endif +if TSS_BUILD_DIR +libtcs_emu_a_SOURCES+=tcsi_dir.c rpc/@RPC@/rpc_dir.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_DIR +endif +if TSS_BUILD_PCR_EVENTS +libtcs_emu_a_SOURCES+=tcsi_evlog.c tcs_evlog_biosem.c tcs_evlog_imaem.c tcs_evlog.c \ + rpc/@RPC@/rpc_evlog.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_PCR_EVENTS +endif +if TSS_BUILD_SIGN +libtcs_emu_a_SOURCES+=tcsi_sign.c rpc/@RPC@/rpc_sign.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_SIGN +endif +if TSS_BUILD_QUOTE +libtcs_emu_a_SOURCES+=tcsi_quote.c tcs_quote.c rpc/@RPC@/rpc_quote.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_QUOTE +endif +if TSS_BUILD_SEAL +libtcs_emu_a_SOURCES+=tcsi_seal.c tcs_seal.c rpc/@RPC@/rpc_seal.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_SEAL +endif +if TSS_BUILD_CHANGEAUTH +libtcs_emu_a_SOURCES+=tcsi_changeauth.c rpc/@RPC@/rpc_changeauth.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_CHANGEAUTH +endif +if TSS_BUILD_BIND +libtcs_emu_a_SOURCES+=tcsi_bind.c rpc/@RPC@/rpc_bind.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_BIND +endif +if TSS_BUILD_OWN +libtcs_emu_a_SOURCES+=tcsi_own.c rpc/@RPC@/rpc_own.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_OWN +endif +if TSS_BUILD_PS +libtcs_emu_a_SOURCES+=ps/ps_utils.c ps/tcsps.c tcsi_ps.c tcs_ps.c tcs_key_ps.c rpc/@RPC@/rpc_ps.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_PS +endif +if TSS_BUILD_ADMIN +libtcs_emu_a_SOURCES+=tcsi_admin.c rpc/@RPC@/rpc_admin.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_ADMIN +endif +if TSS_BUILD_AIK +libtcs_emu_a_SOURCES+=tcsi_aik.c tcs_aik.c rpc/@RPC@/rpc_aik.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_AIK +endif +if TSS_BUILD_EK +libtcs_emu_a_SOURCES+=tcsi_ek.c rpc/@RPC@/rpc_ek.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_EK +endif +if TSS_BUILD_CERTIFY +libtcs_emu_a_SOURCES+=tcsi_certify.c rpc/@RPC@/rpc_certify.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_CERTIFY +endif +if TSS_BUILD_KEY +libtcs_emu_a_SOURCES+=tcsi_key.c tcs_key.c tcs_key_mem_cache.c tcs_context_key.c rpc/@RPC@/rpc_key.c \ + crypto/@CRYPTO_PACKAGE@/crypto.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_KEY -I@OPENSSL_INCLUDE_DIR@ +endif +if TSS_BUILD_MAINT +libtcs_emu_a_SOURCES+=tcsi_maint.c rpc/@RPC@/rpc_maint.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_MAINT +endif +if TSS_BUILD_MIGRATION +libtcs_emu_a_SOURCES+=tcsi_migration.c tcs_migration.c rpc/@RPC@/rpc_migration.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_MIGRATION +endif +if TSS_BUILD_PCR_EXTEND +libtcs_emu_a_SOURCES+=tcsi_pcr.c rpc/@RPC@/rpc_pcr_extend.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_PCR_EXTEND +endif +if TSS_BUILD_SELFTEST +libtcs_emu_a_SOURCES+=tcsi_selftest.c rpc/@RPC@/rpc_selftest.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_SELFTEST +endif +if TSS_BUILD_DAA +libtcs_emu_a_SOURCES+=tcsi_daa.c rpc/@RPC@/rpc_daa.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_DAA +endif +if TSS_BUILD_NV +libtcs_emu_a_SOURCES+=tcsi_nv.c rpc/@RPC@/rpc_nv.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_NV +endif +if TSS_BUILD_AUDIT +libtcs_emu_a_SOURCES+=tcsi_audit.c rpc/@RPC@/rpc_audit.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_AUDIT +endif +if TSS_BUILD_SEALX +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_SEALX +endif +if TSS_BUILD_TSS12 +libtcs_emu_a_SOURCES+=tcsi_oper.c rpc/@RPC@/rpc_oper.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_TSS12 +endif +if TSS_BUILD_DELEGATION +libtcs_emu_a_SOURCES+=tcsi_delegate.c rpc/@RPC@/rpc_delegate.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_DELEGATION +endif +if TSS_BUILD_QUOTE2 +libtcs_emu_a_SOURCES+=tcsi_quote2.c tcs_quote2.c rpc/@RPC@/rpc_quote2.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_QUOTE2 +endif +if TSS_BUILD_CMK +libtcs_emu_a_SOURCES+=tcsi_cmk.c rpc/@RPC@/rpc_cmk.c +libtcs_emu_a_CFLAGS+=-DTSS_BUILD_CMK +endif diff --git a/security/trousers/files/patch-src-tcs-ps-ps_utils.c b/security/trousers/files/patch-src_tcs_ps_ps__utils.c similarity index 93% rename from security/trousers/files/patch-src-tcs-ps-ps_utils.c rename to security/trousers/files/patch-src_tcs_ps_ps__utils.c index cc2dfab9a58b..679a2d8c60af 100644 --- a/security/trousers/files/patch-src-tcs-ps-ps_utils.c +++ b/security/trousers/files/patch-src_tcs_ps_ps__utils.c @@ -1,45 +1,45 @@ ---- src/tcs/ps/ps_utils.c.orig 2014-04-24 18:05:44 UTC +--- src/tcs/ps/ps_utils.c.orig 2016-06-20 15:21:26 UTC +++ src/tcs/ps/ps_utils.c @@ -16,10 +16,18 @@ #if defined(HAVE_BYTEORDER_H) #include #elif defined(HTOLE_DEFINED) +#if defined(HAVE_ENDIAN_H) #include #define LE_16 htole16 #define LE_32 htole32 #define LE_64 htole64 +#endif +#if defined(HAVE_SYS_ENDIAN_H) +#include +#define LE_16 htole16 +#define LE_32 htole32 +#define LE_64 htole64 +#endif #else #define LE_16(x) (x) #define LE_32(x) (x) @@ -42,11 +50,7 @@ struct key_disk_cache *key_disk_cache_head = NULL; -#ifdef SOLARIS TSS_RESULT -#else -inline TSS_RESULT -#endif read_data(int fd, void *data, UINT32 size) { int rc; @@ -64,11 +68,7 @@ read_data(int fd, void *data, UINT32 siz } -#ifdef SOLARIS TSS_RESULT -#else -inline TSS_RESULT -#endif write_data(int fd, void *data, UINT32 size) { int rc; diff --git a/security/trousers/files/patch-src-tcs-ps-tcsps.c b/security/trousers/files/patch-src_tcs_ps_tcsps.c similarity index 96% rename from security/trousers/files/patch-src-tcs-ps-tcsps.c rename to security/trousers/files/patch-src_tcs_ps_tcsps.c index 3f79d1b0e626..3b3e96224e97 100644 --- a/security/trousers/files/patch-src-tcs-ps-tcsps.c +++ b/security/trousers/files/patch-src_tcs_ps_tcsps.c @@ -1,67 +1,67 @@ ---- src/tcs/ps/tcsps.c.orig 2014-04-24 18:05:44 UTC +--- src/tcs/ps/tcsps.c.orig 2016-06-20 15:21:26 UTC +++ src/tcs/ps/tcsps.c @@ -24,6 +24,11 @@ #define LE_16 htole16 #define LE_32 htole32 #define LE_64 htole64 +#elif defined (HAVE_SYS_ENDIAN_H) +#include +#define LE_16 htole16 +#define LE_32 htole32 +#define LE_64 htole64 #else #define LE_16(x) (x) #define LE_32(x) (x) @@ -33,6 +38,26 @@ #include #include +#ifdef __sun +#define LOCK_EX F_LOCK +#define LOCK_UN F_ULOCK +#define flock(fd, func) lockf(fd, func, 0) +#endif + +#ifndef LOCK_SH +#define LOCK_SH 1 /* shared lock */ +#endif +#ifndef LOCK_EX +#define LOCK_EX 2 /* exclusive lock */ +#endif +#ifndef LOCK_NB +#define LOCK_NB 4 /* don't block when locking */ +#endif +#ifndef LOCK_UN +#define LOCK_UN 8 /* unlock */ +#endif + + #include "trousers/tss.h" #include "trousers_types.h" #include "tcsps.h" @@ -43,6 +68,25 @@ #include "tcsd_wrap.h" #include "tcsd.h" +#ifndef LE_16 +static UINT16 htole16(UINT16 x) +{ + BYTE *b = &x; + return (UINT16) (b[0] + (b[1] << 8)); +} +#define LE_16 htole16 +#endif + +#ifndef LE_32 +static UINT32 htole32(UINT32 x) +{ + BYTE *b = &x; + return (UINT32) (b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24)); +} +#define LE_32 htole32 +#endif + + int system_ps_fd = -1; MUTEX_DECLARE(disk_cache_lock); diff --git a/security/trousers/files/patch-src-tcs-rpc-tcstp-rpc.c b/security/trousers/files/patch-src_tcs_rpc_tcstp_rpc.c similarity index 78% rename from security/trousers/files/patch-src-tcs-rpc-tcstp-rpc.c rename to security/trousers/files/patch-src_tcs_rpc_tcstp_rpc.c index e71911c4848a..d37d36ba5ef2 100644 --- a/security/trousers/files/patch-src-tcs-rpc-tcstp-rpc.c +++ b/security/trousers/files/patch-src_tcs_rpc_tcstp_rpc.c @@ -1,10 +1,10 @@ ---- src/tcs/rpc/tcstp/rpc.c.orig 2014-04-24 18:05:44 UTC +--- src/tcs/rpc/tcstp/rpc.c.orig 2016-06-20 15:21:26 UTC +++ src/tcs/rpc/tcstp/rpc.c @@ -16,6 +16,7 @@ #if (defined (__OpenBSD__) || defined (__FreeBSD__)) #include #include +#include #endif #include diff --git a/security/trousers/files/patch-src-tcs-tcs_aik.c b/security/trousers/files/patch-src_tcs_tcs__aik.c similarity index 86% rename from security/trousers/files/patch-src-tcs-tcs_aik.c rename to security/trousers/files/patch-src_tcs_tcs__aik.c index 53868fd76836..c4e4113c72b7 100644 --- a/security/trousers/files/patch-src-tcs-tcs_aik.c +++ b/security/trousers/files/patch-src_tcs_tcs__aik.c @@ -1,11 +1,11 @@ ---- src/tcs/tcs_aik.c.orig 2014-04-24 18:05:44 UTC +--- src/tcs/tcs_aik.c.orig 2016-06-20 15:21:26 UTC +++ src/tcs/tcs_aik.c @@ -66,7 +66,7 @@ UnloadBlob_SYMMETRIC_KEY(UINT64 *offset, UnloadBlob_UINT16(offset, &key->size, blob); if (key->size > 0) { - key->data = (BYTE *)malloc(key->size); + key->data = malloc(key->size); if (key->data == NULL) { LogError("malloc of %hu bytes failed.", key->size); key->size = 0; diff --git a/security/trousers/files/patch-src-tcs-tcs_auth_mgr.c b/security/trousers/files/patch-src_tcs_tcs__auth__mgr.c similarity index 95% rename from security/trousers/files/patch-src-tcs-tcs_auth_mgr.c rename to security/trousers/files/patch-src_tcs_tcs__auth__mgr.c index 7088a4f889b6..ef5f296530e3 100644 --- a/security/trousers/files/patch-src-tcs-tcs_auth_mgr.c +++ b/security/trousers/files/patch-src_tcs_tcs__auth__mgr.c @@ -1,29 +1,29 @@ ---- src/tcs/tcs_auth_mgr.c.orig 2014-04-24 18:05:44 UTC +--- src/tcs/tcs_auth_mgr.c.orig 2016-06-20 15:21:26 UTC +++ src/tcs/tcs_auth_mgr.c @@ -108,7 +108,7 @@ void auth_mgr_swap_in() { if (auth_mgr.overflow[auth_mgr.of_tail] != NULL) { - LogDebug("waking up thread %lddd, auth slot has opened", THREAD_ID); + LogDebug("waking up thread %ld, auth slot has opened", THREAD_ID); /* wake up the next sleeping thread in order and increment tail */ COND_SIGNAL(auth_mgr.overflow[auth_mgr.of_tail]); auth_mgr.overflow[auth_mgr.of_tail] = NULL; @@ -149,7 +149,7 @@ auth_mgr_swap_out(TCS_CONTEXT_HANDLE hCo auth_mgr.overflow[auth_mgr.of_head] = cond; auth_mgr.of_head = (auth_mgr.of_head + 1) % auth_mgr.overflow_size; /* go to sleep */ - LogDebug("thread %lddd going to sleep until auth slot opens", THREAD_ID); + LogDebug("thread %ld going to sleep until auth slot opens", THREAD_ID); auth_mgr.sleeping_threads++; COND_WAIT(cond, &tcsp_lock); auth_mgr.sleeping_threads--; @@ -180,7 +180,7 @@ auth_mgr_swap_out(TCS_CONTEXT_HANDLE hCo auth_mgr.of_tail = 0; auth_mgr.overflow[auth_mgr.of_head] = cond; auth_mgr.of_head = (auth_mgr.of_head + 1) % auth_mgr.overflow_size; - LogDebug("thread %lddd going to sleep until auth slot opens", THREAD_ID); + LogDebug("thread %ld going to sleep until auth slot opens", THREAD_ID); auth_mgr.sleeping_threads++; COND_WAIT(cond, &tcsp_lock); auth_mgr.sleeping_threads--; diff --git a/security/trousers/files/patch-src-tcsd-Makefile.am b/security/trousers/files/patch-src_tcsd_Makefile.am similarity index 90% rename from security/trousers/files/patch-src-tcsd-Makefile.am rename to security/trousers/files/patch-src_tcsd_Makefile.am index 2a067281633c..eb41644dabf3 100644 --- a/security/trousers/files/patch-src-tcsd-Makefile.am +++ b/security/trousers/files/patch-src_tcsd_Makefile.am @@ -1,23 +1,23 @@ ---- src/tcsd/Makefile.am.orig 2014-04-25 03:05:44.000000000 +0900 -+++ src/tcsd/Makefile.am 2016-05-19 03:00:08.951991000 +0900 +--- src/tcsd/Makefile.am.orig 2014-04-24 18:05:44 UTC ++++ src/tcsd/Makefile.am @@ -1,11 +1,17 @@ -sbin_PROGRAMS=tcsd +sbin_PROGRAMS=tcsd tcsd_emu -tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include -fPIE -DPIE -tcsd_LDADD=${top_builddir}/src/tcs/libtcs.a ${top_builddir}/src/tddl/libtddl.a -lpthread @CRYPTOLIB@ +tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include -fPIE -DPIE -I@OPENSSL_INCLUDE_DIR@ +tcsd_LDADD=${top_builddir}/src/tcs/libtcs.a ${top_builddir}/src/tddl/libtddl.a -lpthread -L@OPENSSL_LIB_DIR@ @CRYPTOLIB@ tcsd_LDFLAGS=-pie -Wl,-z,relro -Wl,-z,now tcsd_SOURCES=svrside.c tcsd_conf.c tcsd_threads.c platform.c +tcsd_emu_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include -fPIE -DPIE -I@OPENSSL_INCLUDE_DIR@ +tcsd_emu_LDADD=${top_builddir}/src/tcs/libtcs_emu.a -ltddl -L${LOCALBASE}/lib/tddl_emu -lpthread -L@OPENSSL_LIB_DIR@ @CRYPTOLIB@ +tcsd_emu_LDFLAGS=-pie -Wl,-z,relro -Wl,-z,now -Wl,-rpath=${LOCALBASE}/lib/tddl_emu:${LOCALBASE}/lib + +tcsd_emu_SOURCES=svrside.c tcsd_conf.c tcsd_threads.c platform.c + if TSS_BUILD_PS tcsd_CFLAGS+=-DTSS_BUILD_PS endif diff --git a/security/trousers/files/patch-src-tcsd-svrside.c b/security/trousers/files/patch-src_tcsd_svrside.c similarity index 96% rename from security/trousers/files/patch-src-tcsd-svrside.c rename to security/trousers/files/patch-src_tcsd_svrside.c index dfc6eee35206..e7248c692afa 100644 --- a/security/trousers/files/patch-src-tcsd-svrside.c +++ b/security/trousers/files/patch-src_tcsd_svrside.c @@ -1,63 +1,63 @@ ---- src/tcsd/svrside.c.orig 2014-04-24 18:05:44 UTC +--- src/tcsd/svrside.c.orig 2016-06-20 15:21:26 UTC +++ src/tcsd/svrside.c @@ -92,12 +92,19 @@ tcsd_signal_term(int signal) term = 1; } -void +static void tcsd_signal_hup(int signal) { hup = 1; } +static void +tcsd_signal_chld(int signal) +{ + + wait3(NULL, WNOHANG, NULL); +} + static TSS_RESULT signals_init(void) { @@ -106,6 +113,14 @@ signals_init(void) struct sigaction sa; sigemptyset(&sigmask); + if ((rc = sigaddset(&sigmask, SIGCHLD))) { + LogError("sigaddset: %s", strerror(errno)); + return TCSERR(TSS_E_INTERNAL_ERROR); + } + if ((rc = sigaddset(&sigmask, SIGINT))) { + LogError("sigaddset: %s", strerror(errno)); + return TCSERR(TSS_E_INTERNAL_ERROR); + } if ((rc = sigaddset(&sigmask, SIGTERM))) { LogError("sigaddset: %s", strerror(errno)); return TCSERR(TSS_E_INTERNAL_ERROR); @@ -128,12 +143,24 @@ signals_init(void) return TCSERR(TSS_E_INTERNAL_ERROR); } + if ((rc = sigaction(SIGINT, &sa, NULL))) { + LogError("signal SIGINT not registered: %s", strerror(errno)); + return TCSERR(TSS_E_INTERNAL_ERROR); + } + sa.sa_handler = tcsd_signal_hup; if ((rc = sigaction(SIGHUP, &sa, NULL))) { LogError("signal SIGHUP not registered: %s", strerror(errno)); return TCSERR(TSS_E_INTERNAL_ERROR); } + sa.sa_flags = SA_RESTART; + sa.sa_handler = tcsd_signal_chld; + if ((rc = sigaction(SIGCHLD, &tcsd_sa_chld, NULL))) { + LogError("signal SIGCHLD not registered: %s", strerror(errno)); + return TCSERR(TSS_E_INTERNAL_ERROR); + } + return TSS_SUCCESS; } diff --git a/security/trousers/files/patch-src-tddl-Makefile.am b/security/trousers/files/patch-src_tddl_Makefile.am similarity index 100% rename from security/trousers/files/patch-src-tddl-Makefile.am rename to security/trousers/files/patch-src_tddl_Makefile.am diff --git a/security/trousers/files/patch-src-trspi-Makefile.am b/security/trousers/files/patch-src_trspi_Makefile.am similarity index 75% rename from security/trousers/files/patch-src-trspi-Makefile.am rename to security/trousers/files/patch-src_trspi_Makefile.am index e834550f5121..439a229f7d3c 100644 --- a/security/trousers/files/patch-src-trspi-Makefile.am +++ b/security/trousers/files/patch-src_trspi_Makefile.am @@ -1,12 +1,12 @@ ---- src/trspi/Makefile.am.orig 2014-04-25 03:05:44.000000000 +0900 -+++ src/trspi/Makefile.am 2016-05-19 03:16:29.786606000 +0900 +--- src/trspi/Makefile.am.orig 2014-04-24 18:05:44 UTC ++++ src/trspi/Makefile.am @@ -1,7 +1,8 @@ noinst_LTLIBRARIES=libtrousers.la libtrousers_la_SOURCES=trousers.c crypto/@CRYPTO_PACKAGE@/hash.c -libtrousers_la_CFLAGS=-DAPPID=\"TSPI\" -I${top_srcdir}/src/include +libtrousers_la_CFLAGS=-DAPPID=\"TSPI\" -I${top_srcdir}/src/include \ + -I${ICONV_PREFIX}/include -I@OPENSSL_INCLUDE_DIR@ if TSS_BUILD_ASYM_CRYPTO libtrousers_la_SOURCES+=crypto/@CRYPTO_PACKAGE@/rsa.c diff --git a/security/trousers/files/patch-src-tspi-Makefile.am b/security/trousers/files/patch-src_tspi_Makefile.am similarity index 83% rename from security/trousers/files/patch-src-tspi-Makefile.am rename to security/trousers/files/patch-src_tspi_Makefile.am index 66be8ad0b6a5..658a5f6b04c5 100644 --- a/security/trousers/files/patch-src-tspi-Makefile.am +++ b/security/trousers/files/patch-src_tspi_Makefile.am @@ -1,14 +1,14 @@ ---- src/tspi/Makefile.am.orig 2014-04-25 03:05:44.000000000 +0900 -+++ src/tspi/Makefile.am 2016-05-19 03:04:18.883005000 +0900 -@@ -17,9 +17,9 @@ +--- src/tspi/Makefile.am.orig 2014-04-24 18:05:44 UTC ++++ src/tspi/Makefile.am +@@ -17,9 +17,9 @@ libtspi_la_LIBADD=${top_builddir}/src/tr # 5. If any interfaces have been added since the last public release, then increment age. # 6. If any interfaces have been removed since the last public release, then set age to 0. -libtspi_la_LDFLAGS=-version-info 3:0:2 -lpthread @CRYPTOLIB@ +libtspi_la_LDFLAGS=-version-info 3:0:2 -lpthread -L@OPENSSL_LIB_DIR@ @CRYPTOLIB@ -L${ICONV_PREFIX}/lib ${ICONV_LIB} -libtspi_la_CFLAGS=-I$(top_srcdir)/src/include -DAPPID=\"TSPI\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" +libtspi_la_CFLAGS=-I$(top_srcdir)/src/include -DAPPID=\"TSPI\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I@OPENSSL_INCLUDE_DIR@ libtspi_la_SOURCES=log.c \ spi_utils.c \ diff --git a/security/trousers/files/patch-src-tspi-ps-ps_utils.c b/security/trousers/files/patch-src_tspi_ps_ps__utils.c similarity index 86% rename from security/trousers/files/patch-src-tspi-ps-ps_utils.c rename to security/trousers/files/patch-src_tspi_ps_ps__utils.c index 0bb38d1cbbc2..1c83180cf7bc 100644 --- a/security/trousers/files/patch-src-tspi-ps-ps_utils.c +++ b/security/trousers/files/patch-src_tspi_ps_ps__utils.c @@ -1,20 +1,20 @@ ---- src/tspi/ps/ps_utils.c.orig 2014-04-24 18:05:44 UTC +--- src/tspi/ps/ps_utils.c.orig 2016-06-20 15:21:26 UTC +++ src/tspi/ps/ps_utils.c @@ -22,7 +22,7 @@ #include "tspps.h" #include "tsplog.h" -inline TSS_RESULT +TSS_RESULT read_data(int fd, void *data, UINT32 size) { int rc; @@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 siz return TSS_SUCCESS; } -inline TSS_RESULT +TSS_RESULT write_data(int fd, void *data, UINT32 size) { int rc; diff --git a/security/trousers/files/patch-src-tspi-ps-tspps.c b/security/trousers/files/patch-src_tspi_ps_tspps.c similarity index 97% rename from security/trousers/files/patch-src-tspi-ps-tspps.c rename to security/trousers/files/patch-src_tspi_ps_tspps.c index d58f17d5f48c..48f55a0eae7b 100644 --- a/security/trousers/files/patch-src-tspi-ps-tspps.c +++ b/security/trousers/files/patch-src_tspi_ps_tspps.c @@ -1,89 +1,89 @@ ---- src/tspi/ps/tspps.c.orig 2014-04-24 18:05:44 UTC +--- src/tspi/ps/tspps.c.orig 2016-06-20 15:21:26 UTC +++ src/tspi/ps/tspps.c @@ -29,6 +29,11 @@ #define LE_16 htole16 #define LE_32 htole32 #define LE_64 htole64 +#elif defined(HAVE_SYS_ENDIAN_H) +#include +#define LE_16 htole16 +#define LE_32 htole32 +#define LE_64 htole64 #else #define LE_16(x) (x) #define LE_32(x) (x) @@ -43,9 +48,13 @@ #include "tspps.h" #include "tsplog.h" + static int user_ps_fd = -1; static MUTEX_DECLARE_INIT(user_ps_lock); #if (defined (__FreeBSD__) || defined (__OpenBSD__)) +#include +#define LE_16 htole16 +#define LE_32 htole32 static MUTEX_DECLARE_INIT(user_ps_path); #endif static struct flock fl; @@ -60,9 +69,7 @@ get_user_ps_path(char **file) TSS_RESULT result; char *file_name = NULL, *home_dir = NULL; struct passwd *pwp; -#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) struct passwd pw; -#endif struct stat stat_buf; char buf[PASSWD_BUFSIZE]; uid_t euid; @@ -72,10 +79,6 @@ get_user_ps_path(char **file) *file = strdup(file_name); return (*file) ? TSS_SUCCESS : TSPERR(TSS_E_OUTOFMEMORY); } -#if (defined (__FreeBSD__) || defined (__OpenBSD__)) - MUTEX_LOCK(user_ps_path); -#endif - euid = geteuid(); #if defined (SOLARIS) @@ -88,32 +91,14 @@ get_user_ps_path(char **file) */ rc = snprintf(buf, sizeof (buf), "%s/%d", TSS_USER_PS_DIR, euid); #else - setpwent(); - while (1) { -#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) - rc = getpwent_r(&pw, buf, PASSWD_BUFSIZE, &pwp); - if (rc) { - LogDebugFn("USER PS: Error getting path to home directory: getpwent_r: %s", - strerror(rc)); - endpwent(); - return TSPERR(TSS_E_INTERNAL_ERROR); - } + rc = getpwuid_r(euid, &pw, buf, PASSWD_BUFSIZE, &pwp); + if (rc) { + LogDebugFn("USER PS: Error getting path to home directory: " + "getpwent_r: %s", strerror(rc)); + return TSPERR(TSS_E_INTERNAL_ERROR); + } -#elif (defined (__FreeBSD__) || defined (__OpenBSD__)) - if ((pwp = getpwent()) == NULL) { - LogDebugFn("USER PS: Error getting path to home directory: getpwent: %s", - strerror(rc)); - endpwent(); - MUTEX_UNLOCK(user_ps_path); - return TSPERR(TSS_E_INTERNAL_ERROR); - } -#endif - if (euid == pwp->pw_uid) { - home_dir = strdup(pwp->pw_dir); - break; - } - } - endpwent(); + home_dir = strdup(pwp->pw_dir); if (!home_dir) return TSPERR(TSS_E_OUTOFMEMORY); diff --git a/security/trousers/files/patch-src-tspi-rpc-hosttable.c b/security/trousers/files/patch-src_tspi_rpc_hosttable.c similarity index 94% rename from security/trousers/files/patch-src-tspi-rpc-hosttable.c rename to security/trousers/files/patch-src_tspi_rpc_hosttable.c index 144ec14535ad..0acd9ec1a845 100644 --- a/security/trousers/files/patch-src-tspi-rpc-hosttable.c +++ b/security/trousers/files/patch-src_tspi_rpc_hosttable.c @@ -1,38 +1,38 @@ ---- src/tspi/rpc/hosttable.c.orig 2014-04-24 18:05:44 UTC +--- src/tspi/rpc/hosttable.c.orig 2016-06-20 15:21:26 UTC +++ src/tspi/rpc/hosttable.c @@ -51,6 +51,8 @@ host_table_final() { struct host_table_entry *hte, *next = NULL; + if( ht == NULL ) return; + MUTEX_LOCK(ht->lock); for (hte = ht->entries; hte; hte = next) { @@ -84,6 +86,8 @@ __tspi_add_table_entry(TSS_HCONTEXT tspC { struct host_table_entry *entry, *tmp; + if( ht == NULL ) return TSPERR(TSS_E_OUTOFMEMORY); + entry = calloc(1, sizeof(struct host_table_entry)); if (entry == NULL) { LogError("malloc of %zd bytes failed.", sizeof(struct host_table_entry)); @@ -134,6 +138,8 @@ remove_table_entry(TSS_HCONTEXT tspConte { struct host_table_entry *hte, *prev = NULL; + if( ht == NULL ) return; + MUTEX_LOCK(ht->lock); for (hte = ht->entries; hte; prev = hte, hte = hte->next) { @@ -158,6 +164,8 @@ get_table_entry(TSS_HCONTEXT tspContext) { struct host_table_entry *index = NULL; + if( ht == NULL ) return NULL; + MUTEX_LOCK(ht->lock); for (index = ht->entries; index; index = index->next) { diff --git a/security/trousers/files/patch-src-tspi-rpc-tcstp-rpc.c b/security/trousers/files/patch-src_tspi_rpc_tcstp_rpc.c similarity index 86% rename from security/trousers/files/patch-src-tspi-rpc-tcstp-rpc.c rename to security/trousers/files/patch-src_tspi_rpc_tcstp_rpc.c index 5de4c2079f55..b26709a8b271 100644 --- a/security/trousers/files/patch-src-tspi-rpc-tcstp-rpc.c +++ b/security/trousers/files/patch-src_tspi_rpc_tcstp_rpc.c @@ -1,11 +1,11 @@ ---- src/tspi/rpc/tcstp/rpc.c.orig 2014-04-24 18:05:44 UTC +--- src/tspi/rpc/tcstp/rpc.c.orig 2016-06-20 15:21:26 UTC +++ src/tspi/rpc/tcstp/rpc.c @@ -304,7 +304,7 @@ recv_from_socket(int sock, void *buffer, errno = 0; if ((recv_size = recv(sock, buffer+recv_total, size-recv_total, 0)) <= 0) { if (recv_size < 0) { - if (errno == EINTR) + if (errno == EINTR || errno == EAGAIN) continue; LogError("Socket receive connection error: %s.", strerror(errno)); } else { diff --git a/security/trousers/files/patch-src-tspi-tsp_tcsi_param.c b/security/trousers/files/patch-src_tspi_tsp__tcsi__param.c similarity index 84% rename from security/trousers/files/patch-src-tspi-tsp_tcsi_param.c rename to security/trousers/files/patch-src_tspi_tsp__tcsi__param.c index 5aae426603a1..aa975ed99421 100644 --- a/security/trousers/files/patch-src-tspi-tsp_tcsi_param.c +++ b/security/trousers/files/patch-src_tspi_tsp__tcsi__param.c @@ -1,15 +1,15 @@ ---- src/tspi/tsp_tcsi_param.c.orig 2014-04-24 18:05:44 UTC +--- src/tspi/tsp_tcsi_param.c.orig 2016-06-20 15:21:26 UTC +++ src/tspi/tsp_tcsi_param.c @@ -11,7 +11,12 @@ #include #include #include +#if !defined(__FreeBSD__) #include +#else +#include +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif #include "trousers/tss.h" #include "trousers/trousers.h" #include "trousers_types.h" diff --git a/security/xorsearch/Makefile b/security/xorsearch/Makefile index 2f290977a854..2f45ce918fb3 100644 --- a/security/xorsearch/Makefile +++ b/security/xorsearch/Makefile @@ -1,25 +1,26 @@ # Created by: Edwin Groothuis # $FreeBSD$ PORTNAME= xorsearch PORTVERSION= 1.2.0 CATEGORIES= security textproc MASTER_SITES= http://www.didierstevens.com/files/software/ DISTNAME= XORSearch_V1_2_0 MAINTAINER= edwin@mavetju.org COMMENT= Search for a given string in an XOR or ROL encoded binary file -USES= zip -WRKSRC= ${WRKDIR} +USES= dos2unix zip +DOS2UNIX_GLOB= *.c +NO_WRKSUBDIR= yes PLIST_FILES= bin/xorsearch do-build: - ${CC} -o ${WRKDIR}/XORSearch ${WRKDIR}/XORSearch.c + ${CC} -o ${WRKSRC}/XORSearch ${WRKSRC}/XORSearch.c do-install: - ${INSTALL_PROGRAM} ${WRKDIR}/XORSearch \ + ${INSTALL_PROGRAM} ${WRKSRC}/XORSearch \ ${STAGEDIR}${PREFIX}/bin/xorsearch .include diff --git a/security/xorsearch/files/patch-XORSearch.c b/security/xorsearch/files/patch-XORSearch.c index b42befea1a63..20d6023363da 100644 --- a/security/xorsearch/files/patch-XORSearch.c +++ b/security/xorsearch/files/patch-XORSearch.c @@ -1,10 +1,10 @@ ---- XORSearch.c.orig Tue Dec 18 07:27:32 2007 -+++ XORSearch.c Tue Dec 18 07:27:38 2007 +--- XORSearch.c.orig 2016-06-20 15:09:40 UTC ++++ XORSearch.c @@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include + #include + #include + #include +-#include + #include + #include + #include diff --git a/shells/ibsh/Makefile b/shells/ibsh/Makefile index a2f75fb6581a..fc2ef1d9d315 100644 --- a/shells/ibsh/Makefile +++ b/shells/ibsh/Makefile @@ -1,37 +1,37 @@ # Created by: Vaida Bogdan # $FreeBSD$ PORTNAME= ibsh PORTVERSION= 0.3e CATEGORIES= shells MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Restricted unix shell LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= gmake +USES= dos2unix gmake ALL_TARGET= ibsh INSTALL_TARGET= ibsh_install MAKE_ARGS= CC="${CC}" PREFIX="${STAGEDIR}${PREFIX}" SUB_FILES= pkg-message PORTDOCS= AUTHORS BUGS CONTRIBUTORS COPYING COPYRIGHT ChangeLog \ INSTALL README TODO VERSION OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e 's|PATH_MAX|PATH_MAXb|g' ${WRKSRC}/delbadfiles.c ${WRKSRC}/ibsh.h @${REINPLACE_CMD} -e 's|/etc/ibsh|${PREFIX}/etc/ibsh|g' ${WRKSRC}/ibsh.h post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ibsh post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/shells/ibsh/files/patch-Makefile b/shells/ibsh/files/patch-Makefile index eee459054000..311cf9078496 100644 --- a/shells/ibsh/files/patch-Makefile +++ b/shells/ibsh/files/patch-Makefile @@ -1,21 +1,21 @@ ---- Makefile.orig 2005-06-03 13:47:32 UTC +--- Makefile.orig 2016-06-20 15:08:34 UTC +++ Makefile -@@ -30,12 +30,12 @@ delbadfiles.o: delbadfiles.c ibsh.h - ${CC} -c delbadfiles.c - - ibsh_install: -- cp ./ibsh /bin/ -- mkdir /etc/ibsh -- mkdir /etc/ibsh/cmds -- mkdir /etc/ibsh/xtns -- cp ./globals.cmds /etc/ibsh/ -- cp ./globals.xtns /etc/ibsh/ -+ cp ./ibsh ${PREFIX}/bin/ -+ mkdir ${PREFIX}/etc/ibsh -+ mkdir ${PREFIX}/etc/ibsh/cmds -+ mkdir ${PREFIX}/etc/ibsh/xtns -+ cp ./globals.cmds ${PREFIX}/etc/ibsh/ -+ cp ./globals.xtns ${PREFIX}/etc/ibsh/ - - ibsh_uninstall: - rm -rf /etc/ibsh/globals.cmds +@@ -30,12 +30,12 @@ delbadfiles.o: delbadfiles.c ibsh.h + ${CC} -c delbadfiles.c + + ibsh_install: +- cp ./ibsh /bin/ +- mkdir /etc/ibsh +- mkdir /etc/ibsh/cmds +- mkdir /etc/ibsh/xtns +- cp ./globals.cmds /etc/ibsh/ +- cp ./globals.xtns /etc/ibsh/ ++ cp ./ibsh ${PREFIX}/bin/ ++ mkdir ${PREFIX}/etc/ibsh ++ mkdir ${PREFIX}/etc/ibsh/cmds ++ mkdir ${PREFIX}/etc/ibsh/xtns ++ cp ./globals.cmds ${PREFIX}/etc/ibsh/ ++ cp ./globals.xtns ${PREFIX}/etc/ibsh/ + + ibsh_uninstall: + rm -rf /etc/ibsh/globals.cmds diff --git a/sysutils/rfstool/Makefile b/sysutils/rfstool/Makefile index 11f263757d3a..2629827b3dd0 100644 --- a/sysutils/rfstool/Makefile +++ b/sysutils/rfstool/Makefile @@ -1,24 +1,25 @@ # Created by: trevor # $FreeBSD$ PORTNAME= rfstool PORTVERSION= 0.14 CATEGORIES= sysutils MASTER_SITES= NETBSD DISTNAME= rfstool-0.14-source MAINTAINER= ports@FreeBSD.org COMMENT= Read from a Reiser file system PLIST_FILES= bin/rfstool -USES= zip +USES= dos2unix zip +DOS2UNIX_FILES= reiserfs.h WRKSRC= ${WRKDIR}/rfstool-0.14/RFSTOOL MAKEFILE= makefile.gcc3x post-extract: @${REINPLACE_CMD} -e "s,g++,\$${CXX},g" ${WRKSRC}/${MAKEFILE} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/rfstool ${STAGEDIR}${PREFIX}/bin .include diff --git a/sysutils/rfstool/files/patch-reiserfs.h b/sysutils/rfstool/files/patch-reiserfs.h index 21e8ea1b6eae..4a59c3bb85e7 100644 --- a/sysutils/rfstool/files/patch-reiserfs.h +++ b/sysutils/rfstool/files/patch-reiserfs.h @@ -1,11 +1,11 @@ ---- reiserfs.h.orig Mon Oct 2 13:58:35 2006 -+++ reiserfs.h Mon Oct 2 13:58:39 2006 -@@ -268,7 +268,7 @@ - { - } - -- ReiserFsBlock::~ReiserFsBlock() -+ ~ReiserFsBlock() - { - delete m_lpbMemory; - } +--- reiserfs.h.orig 2016-06-20 13:19:25 UTC ++++ reiserfs.h +@@ -268,7 +268,7 @@ class ReiserFsBlock : public PNode + { + } + +- ReiserFsBlock::~ReiserFsBlock() ++ ~ReiserFsBlock() + { + delete m_lpbMemory; + } diff --git a/textproc/expat2/Makefile b/textproc/expat2/Makefile index 00273026a61f..5a566c5e8f1c 100644 --- a/textproc/expat2/Makefile +++ b/textproc/expat2/Makefile @@ -1,21 +1,22 @@ # Created by: Dirk Froemberg # $FreeBSD$ PORTNAME= expat PORTVERSION= 2.1.1 PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= SF MAINTAINER= kuriyama@FreeBSD.org COMMENT= XML 1.0 parser written in C GNU_CONFIGURE= yes ALL_TARGET= default -USES= libtool pathfix tar:bz2 +USES= dos2unix libtool pathfix tar:bz2 +DOS2UNIX_GLOB= *.txt USE_LDCONFIG= yes post-stage: ${LN} -s libexpat.so.1 ${STAGEDIR}${PREFIX}/lib/libexpat.so.6 .include diff --git a/textproc/expat2/files/patch-cve-2012-6702-plus-cve-2016-5300-v1 b/textproc/expat2/files/patch-cve-2012-6702-plus-cve-2016-5300-v1 index de962941c8de..23a47f43c816 100644 --- a/textproc/expat2/files/patch-cve-2012-6702-plus-cve-2016-5300-v1 +++ b/textproc/expat2/files/patch-cve-2012-6702-plus-cve-2016-5300-v1 @@ -1,134 +1,134 @@ From cb31522769d11a375078a073cba94e7176cb48a4 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 16 Mar 2016 15:30:12 +0100 Subject: [PATCH] Resolve call to srand, use more entropy (patch version 1.0) Squashed backport against vanilla Expat 2.1.1, addressing: * CVE-2012-6702 -- unanticipated internal calls to srand * CVE-2016-5300 -- use of too little entropy Since commit e3e81a6d9f0885ea02d3979151c358f314bf3d6d (released with Expat 2.1.0) Expat called srand by itself from inside generate_hash_secret_salt for an instance of XML_Parser if XML_SetHashSalt was either (a) not called for that instance or if (b) salt 0 was passed to XML_SetHashSalt prior to parsing. That call to srand passed (rather litle) entropy extracted from the current time as a seed for srand. That call to srand (1) broke repeatability for code calling srand with a non-random seed prior to parsing with Expat, and (2) resulted in a rather small set of hashing salts in Expat in total. For a short- to mid-term fix, the new approach avoids calling srand altogether, extracts more entropy out of the clock and other sources, too. For a long term fix, we may want to read sizeof(long) bytes from a source like getrandom(..) on Linux, and from similar sources on other supported architectures. https://bugzilla.redhat.com/show_bug.cgi?id=1197087 --- expat/CMakeLists.txt | 3 +++ expat/lib/xmlparse.c | 48 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 353627e..524d514 100755 --- CMakeLists.txt +++ CMakeLists.txt @@ -41,6 +41,9 @@ include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib) - if(MSVC) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996) - endif(MSVC) -+if(WIN32) -+ add_definitions(-DCOMPILED_FROM_DSP) -+endif(WIN32) - - set(expat_SRCS - lib/xmlparse.c + if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996) + endif(MSVC) ++if(WIN32) ++ add_definitions(-DCOMPILED_FROM_DSP) ++endif(WIN32) + + set(expat_SRCS + lib/xmlparse.c diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index e308c79..c5f942f 100644 --- lib/xmlparse.c +++ lib/xmlparse.c @@ -6,7 +6,14 @@ #include /* memset(), memcpy() */ #include #include /* UINT_MAX */ -#include /* time() */ + +#ifdef COMPILED_FROM_DSP +#define getpid GetCurrentProcessId +#else +#include /* gettimeofday() */ +#include /* getpid() */ +#include /* getpid() */ +#endif #define XML_BUILDING_EXPAT 1 @@ -432,7 +439,7 @@ static ELEMENT_TYPE * getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, const char *end); -static unsigned long generate_hash_secret_salt(void); +static unsigned long generate_hash_secret_salt(XML_Parser parser); static XML_Bool startParsing(XML_Parser parser); static XML_Parser @@ -691,11 +698,38 @@ static const XML_Char implicitContext[] = { }; static unsigned long -generate_hash_secret_salt(void) +gather_time_entropy(void) { - unsigned int seed = time(NULL) % UINT_MAX; - srand(seed); - return rand(); +#ifdef COMPILED_FROM_DSP + FILETIME ft; + GetSystemTimeAsFileTime(&ft); /* never fails */ + return ft.dwHighDateTime ^ ft.dwLowDateTime; +#else + struct timeval tv; + int gettimeofday_res; + + gettimeofday_res = gettimeofday(&tv, NULL); + assert (gettimeofday_res == 0); + + /* Microseconds time is <20 bits entropy */ + return tv.tv_usec; +#endif +} + +static unsigned long +generate_hash_secret_salt(XML_Parser parser) +{ + /* Process ID is 0 bits entropy if attacker has local access + * XML_Parser address is few bits of entropy if attacker has local access */ + const unsigned long entropy = + gather_time_entropy() ^ getpid() ^ (unsigned long)parser; + + /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */ + if (sizeof(unsigned long) == 4) { + return entropy * 2147483647; + } else { + return entropy * 2305843009213693951; + } } static XML_Bool /* only valid for root parser */ @@ -703,7 +737,7 @@ startParsing(XML_Parser parser) { /* hash functions must be initialized before setContext() is called */ if (hash_secret_salt == 0) - hash_secret_salt = generate_hash_secret_salt(); + hash_secret_salt = generate_hash_secret_salt(parser); if (ns) { /* implicit context only set for root parser, since child parsers (i.e. external entity parsers) will inherit it -- 2.8.2 diff --git a/textproc/p5-XML-AutoWriter/Makefile b/textproc/p5-XML-AutoWriter/Makefile index 70c20dfb6661..c9e1df7e5b04 100644 --- a/textproc/p5-XML-AutoWriter/Makefile +++ b/textproc/p5-XML-AutoWriter/Makefile @@ -1,25 +1,26 @@ # $FreeBSD$ PORTNAME= XML-AutoWriter PORTVERSION= 0.40 PORTREVISION= 1 CATEGORIES= textproc perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- DISTNAME= ${PORTNAME}-0.4 MAINTAINER= kuriyama@FreeBSD.org COMMENT= Perl module for DOCTYPE based XML output LICENSE= ART10 GPLv1 BSD4CLAUSE LICENSE_COMB= dual TEST_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser -USES= perl5 +USES= dos2unix perl5 +DOS2UNIX_GLOB= *.pm USE_PERL5= configure post-patch: ${RM} ${WRKSRC}/lib/XML/*.orig .include diff --git a/textproc/p5-XML-AutoWriter/files/patch-Makefile.PL b/textproc/p5-XML-AutoWriter/files/patch-Makefile.PL index 4618fef63a73..885901fc6790 100644 --- a/textproc/p5-XML-AutoWriter/files/patch-Makefile.PL +++ b/textproc/p5-XML-AutoWriter/files/patch-Makefile.PL @@ -1,10 +1,10 @@ ---- Makefile.PL.orig 2012-12-23 11:07:17.511361339 +0900 -+++ Makefile.PL 2012-12-23 11:09:35.165438990 +0900 -@@ -9,7 +9,6 @@ +--- Makefile.PL.orig 2009-06-11 18:26:48 UTC ++++ Makefile.PL +@@ -9,7 +9,6 @@ requires => 'XML::Parser'; build_requires => 'Test'; build_requires => 'IO::File'; -auto_set_repository; auto_manifest; auto_install; WriteAll; diff --git a/textproc/p5-XML-AutoWriter/files/patch-Doctype.pm b/textproc/p5-XML-AutoWriter/files/patch-lib_XML_Doctype.pm similarity index 67% rename from textproc/p5-XML-AutoWriter/files/patch-Doctype.pm rename to textproc/p5-XML-AutoWriter/files/patch-lib_XML_Doctype.pm index d9d905f2fae4..be7993d4c047 100644 --- a/textproc/p5-XML-AutoWriter/files/patch-Doctype.pm +++ b/textproc/p5-XML-AutoWriter/files/patch-lib_XML_Doctype.pm @@ -1,12 +1,12 @@ ---- lib/XML/Doctype.pm.orig Tue Dec 27 23:27:13 2005 -+++ lib/XML/Doctype.pm Mon Jan 30 23:43:38 2006 -@@ -62,7 +62,9 @@ - =cut - - use strict ; +--- lib/XML/Doctype.pm.orig 2016-06-20 16:08:38 UTC ++++ lib/XML/Doctype.pm +@@ -62,7 +62,9 @@ XML::Doctype::ENITITY + =cut + + use strict ; +use Config; - use vars qw( $VERSION %_default_dtds ) ; + use vars qw( $VERSION %_default_dtds ) ; +use lib $Config{sitelib}; - use fields ( - 'ELTS', # A hash of declared & undeclared elements, keyed by name - 'NAME', # The root node (the name from the DOCTYPE decl). + use fields ( + 'ELTS', # A hash of declared & undeclared elements, keyed by name + 'NAME', # The root node (the name from the DOCTYPE decl). diff --git a/www/repos-style/Makefile b/www/repos-style/Makefile index 30c4ec19ec1e..0b2e2aedac1e 100644 --- a/www/repos-style/Makefile +++ b/www/repos-style/Makefile @@ -1,38 +1,39 @@ # Created by: Alexander Kriventsov # $FreeBSD$ PORTNAME= repos-style PORTVERSION= 2.0 PORTREVISION= 2 CATEGORIES= www MASTER_SITES= ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/ \ http://mirror.amdmi3.ru/distfiles/ MAINTAINER= avk@vl.ru COMMENT= Stylesheet for the Subversion index web page BROKEN_powerpc64= Does not build RUN_DEPENDS= subversion>=0:devel/subversion -USES= zip +USES= dos2unix zip +DOS2UNIX_GLOB= *.xsl *.php NO_BUILD= YES USE_PHP= xml WANT_PHP_WEB= yes WRKSRC= ${WRKDIR}/repos-web SUB_LIST+= PORTNAME=${PORTNAME} SUB_FILES+= pkg-message pre-install: # Prevent installation of .orig files by deleting them. @${FIND} ${WRKSRC} -name '*.orig' -delete ${MV} ${WRKSRC}/open/log/index.php ${WRKSRC}/open/log/index.dist.php do-install: @${MKDIR} ${STAGEDIR}${WWWDIR} @(cd ${WRKSRC} && ${PAX} -r -w . ${STAGEDIR}${WWWDIR}) .include diff --git a/www/repos-style/files/patch-open-log-index.php b/www/repos-style/files/patch-open_log_index.php similarity index 71% rename from www/repos-style/files/patch-open-log-index.php rename to www/repos-style/files/patch-open_log_index.php index 63cf7f4be669..4da027dc05f7 100644 --- a/www/repos-style/files/patch-open-log-index.php +++ b/www/repos-style/files/patch-open_log_index.php @@ -1,11 +1,11 @@ ---- open/log/index.php.orig 2009-03-13 11:39:06.000000000 +0100 -+++ open/log/index.php 2009-08-21 22:36:25.000000000 +0200 +--- open/log/index.php.orig 2016-06-20 16:09:43 UTC ++++ open/log/index.php @@ -18,7 +18,7 @@ - // === Print svn log --xml to response === - - // Set the URL to the stylesheet, must be same host or absolute path from root --$xslt = '/repos-web/view/log.xsl'; -+$xslt = '/repos-style/view/log.xsl'; - - // URL or path to repository, no trailing slash - // (note that the log viewer may bypass access control) + // === Print svn log --xml to response === + + // Set the URL to the stylesheet, must be same host or absolute path from root +-$xslt = '/repos-web/view/log.xsl'; ++$xslt = '/repos-style/view/log.xsl'; + + // URL or path to repository, no trailing slash + // (note that the log viewer may bypass access control) diff --git a/www/repos-style/files/patch-view-log.xsl b/www/repos-style/files/patch-view_log.xsl similarity index 73% rename from www/repos-style/files/patch-view-log.xsl rename to www/repos-style/files/patch-view_log.xsl index 60da8b5f9fa6..4e1f7343f02b 100644 --- a/www/repos-style/files/patch-view-log.xsl +++ b/www/repos-style/files/patch-view_log.xsl @@ -1,11 +1,11 @@ ---- view/log.xsl.orig 2009-03-12 22:15:36.000000000 +0100 -+++ view/log.xsl 2009-08-21 22:39:20.000000000 +0200 -@@ -25,7 +25,7 @@ - - - -- /repos-web/ +--- view/log.xsl.orig 2016-06-20 16:09:43 UTC ++++ view/log.xsl +@@ -25,7 +25,7 @@ limitations under the License. + + + +- /repos-web/ + /repos-style/ - - style/ - + + style/ + diff --git a/www/repos-style/files/patch-view-repos.xsl b/www/repos-style/files/patch-view_repos.xsl similarity index 75% rename from www/repos-style/files/patch-view-repos.xsl rename to www/repos-style/files/patch-view_repos.xsl index b7a9d8d9f85c..d7901014cd13 100644 --- a/www/repos-style/files/patch-view-repos.xsl +++ b/www/repos-style/files/patch-view_repos.xsl @@ -1,11 +1,11 @@ ---- view/repos.xsl.orig 2009-03-13 09:34:04.000000000 +0100 -+++ view/repos.xsl 2009-08-21 22:42:04.000000000 +0200 -@@ -31,7 +31,7 @@ - - - -- /repos-web/ -+ /repos-style/ - - style/ - +--- view/repos.xsl.orig 2016-06-20 16:09:43 UTC ++++ view/repos.xsl +@@ -31,7 +31,7 @@ limitations under the License. + + + +- /repos-web/ ++ /repos-style/ + + style/ + diff --git a/x11-drivers/xf86-video-openchrome/files/patch-configure b/x11-drivers/xf86-video-openchrome/files/patch-configure index 42654fc59a46..d32348a547bb 100644 --- a/x11-drivers/xf86-video-openchrome/files/patch-configure +++ b/x11-drivers/xf86-video-openchrome/files/patch-configure @@ -1,11 +1,11 @@ ---- configure.orig 2008-01-02 15:05:04.000000000 -0500 -+++ configure 2008-01-10 20:48:21.000000000 -0500 -@@ -21484,7 +21484,7 @@ - _ACEOF +--- configure.orig 2013-05-23 15:11:54 UTC ++++ configure +@@ -12742,7 +12742,7 @@ $as_echo "#define X_HAVE_XAAGETROP 1" >> + $as_echo "#define X_NEED_I2CSTART 1" >>confdefs.h -DRIVER_MAN_SUFFIX="4" +DRIVER_MAN_SUFFIX="4x" diff --git a/x11-drivers/xf86-video-openchrome/files/patch-src_via_id.c b/x11-drivers/xf86-video-openchrome/files/patch-src_via__id.c similarity index 75% rename from x11-drivers/xf86-video-openchrome/files/patch-src_via_id.c rename to x11-drivers/xf86-video-openchrome/files/patch-src_via__id.c index 130e2baf2203..35ba5e3945a0 100644 --- a/x11-drivers/xf86-video-openchrome/files/patch-src_via_id.c +++ b/x11-drivers/xf86-video-openchrome/files/patch-src_via__id.c @@ -1,10 +1,10 @@ ---- src/via_id.c.orig 2008-08-18 18:25:16.000000000 -0400 -+++ src/via_id.c 2008-11-11 21:20:14.000000000 -0500 -@@ -207,6 +207,7 @@ +--- src/via_id.c.orig 2013-05-23 15:11:28 UTC ++++ src/via_id.c +@@ -231,6 +231,7 @@ static struct ViaCardIdStruct ViaCardId[ {"VIA VT3343 (P4M890)", VIA_P4M890, 0x1106, 0x3343, VIA_DEVICE_CRT}, {"MSI P4M890M-L/IL (MS-7255)", VIA_P4M890, 0x1462, 0x7255, VIA_DEVICE_CRT}, {"Biostar P4M890-M7 TE", VIA_P4M890, 0x1565, 0x1207, VIA_DEVICE_CRT}, -+ {"Mitac 8624 (Joybook R41E)", VIA_P4M890, 0x1071, 0x8624, VIA_DEVICE_CRT | VIA_DEVICE_LCD}, ++ {"Mitac 8624 (Joybook R41E)", VIA_P4M890, 0x1071, 0x8624, VIA_DEVICE_CRT | VIA_DEVICE_LCD}, {"ASRock P4VM890", VIA_P4M890, 0x1849, 0x3343, VIA_DEVICE_CRT}, - /* keep this */ + /*** VX800 ***/ diff --git a/x11-themes/kde-icons-noia/Makefile b/x11-themes/kde-icons-noia/Makefile index c7d3993c5a3f..e94aa3ef6112 100644 --- a/x11-themes/kde-icons-noia/Makefile +++ b/x11-themes/kde-icons-noia/Makefile @@ -1,15 +1,15 @@ # Created by: Mario Sergio Fujikawa Ferreira # $FreeBSD$ PORTNAME= noia PORTVERSION= 1.00 MASTER_SITES= GENTOO DISTNAME= noia-kde-icons-${PORTVERSION} COMMENT= KDE Noia complete iconset USES= tar:tgz -WRKSRC= "${WRKDIR}/noia_kde_${PORTVERSION:C/\.//}" +WRKSRC= ${WRKDIR}/noia_kde_${PORTVERSION:C/\.//} PORT_SHAREDIR= ${PORTNAME} .include "${.CURDIR}/Makefile.icons" diff --git a/x11-toolkits/hs-wxcore/Makefile b/x11-toolkits/hs-wxcore/Makefile index 3732f0d3182d..8fcec492fb9a 100644 --- a/x11-toolkits/hs-wxcore/Makefile +++ b/x11-toolkits/hs-wxcore/Makefile @@ -1,17 +1,19 @@ # $FreeBSD$ PORTNAME= wxcore PORTVERSION= 0.91.0.0 CATEGORIES= x11-toolkits haskell MAINTAINER= haskell@FreeBSD.org COMMENT= wxHaskell core USE_CABAL= parsec stm wxc>=0.91 wxdirect>=0.91 +USES= dos2unix +DOS2UNIX_GLOB= *.hs + USE_WX= 3.0 WX_COMPS= wx -WX_UNICODE= yes .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include diff --git a/x11-toolkits/hs-wxcore/files/patch-Setup.hs b/x11-toolkits/hs-wxcore/files/patch-Setup.hs index a319b4b4fe18..612c88193677 100644 --- a/x11-toolkits/hs-wxcore/files/patch-Setup.hs +++ b/x11-toolkits/hs-wxcore/files/patch-Setup.hs @@ -1,10 +1,10 @@ ---- ./Setup.hs.orig 2012-04-13 14:40:36.000000000 +0200 -+++ ./Setup.hs 2012-05-13 20:41:08.000000000 +0200 -@@ -66,7 +66,6 @@ - - let libbi' = libbi - { extraLibDirs = extraLibDirs libbi ++ [wxcDirectory] -- , extraLibs = extraLibs libbi ++ ["wxc"] - , ldOptions = ldOptions libbi ++ ["-Wl,-rpath," ++ wxcDirectory] } - - let lib' = lib { libBuildInfo = libbi' } +--- Setup.hs.orig 2016-06-20 16:11:53 UTC ++++ Setup.hs +@@ -78,7 +78,6 @@ myConfHook (pkg0, pbi) flags = do + + let libbi' = libbi + { extraLibDirs = extraLibDirs libbi ++ [wxcDirectory] +- , extraLibs = extraLibs libbi ++ ["wxc"] + , ldOptions = ldOptions libbi ++ ["-Wl,-rpath," ++ wxcDirectory] } + + let lib' = lib { libBuildInfo = libbi' } diff --git a/x11-wm/afterstep/files/AFstep.xpm b/x11-wm/afterstep/files/AFstep.xpm index 2f07b6bebc58..fd96ea6bc8d8 100644 --- a/x11-wm/afterstep/files/AFstep.xpm +++ b/x11-wm/afterstep/files/AFstep.xpm @@ -1,72 +1,72 @@ -/* XPM */ -static char *noname[] = { -/* width height ncolors chars_per_pixel */ -"48 47 18 1", -/* colors */ -"` c #858678", -"a c #B2C0DC", -"b c #3D4C41", -"c c #14E314", -"d c #E3DF2A", -"e c #4E5151", -"f c #3F3D3F", -"g c #101214", -"h c #686560", -"i c #020102", -"j c #2F3538", -"k c #A30E1C", -"l c #7D6F73", -"m c #00018D", -"n c #545851", -"o c #A19685", -"p c #356E3B", -"q c #242134", -/* pixels */ -"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaaaakkkkig``aaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaa`kkggqfqiqo`aaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaooqgkkgkkbfgifo`aaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaa``qggikkkkkjbffqgbaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaoqiqfgikkkkkfjbnejqqn`aaaaaaaaaaaa", -"aaaaaaaaaao`lggqeeebkkkkkkkkqjgjbfiboaaaaaaaaaaa", -"aaaaaaaaaahdpbqgqqjebbpbkkkkkkkkbegoaaaaaaaaaaaa", -"aaaaaaaaagiddddddbqqqjfbpfkkkkkkpeg`aaaaaaaaaaaa", -"aaaaaoafiiidbjhdddddpbqqqqgkkknpefq`aaaaaaaaaaaa", -"aaaoofiqfqgddqjgjdddddddhdpkkppeeqn`aaaaaaaaaaaa", -"`ooeggjebqgpdggpdddjppddddhfpbeebqoaaaaaaaaaaaaa", -"abgqjbbfbqgqdpddd`ejjjdddhebnneeejeaaaaaaaaaaaaa", -"oibeefefefggddddnjjegpd`ejeenefenfjfl`aaaaaaaaaa", -"aiqnebbfneqgbdhmjjbhenhjeneeeenbgqa`eqaaaaaaaaaa", -"`gijebffnnqqjdegbeeeenneeeebfnejlhooejqhaaaaaaaa", -"o`iijnefenqqgddddefnenhnefeenhifa`afjnngqaaaaaaa", -"aoiiijhnfnbggddddfnenneeebnehqioaa`afjnhegn`aaaa", -"a`iigiqnefggpdd`jeheennenhebcccphla```qjffqfaoaa", -"a`figiiqnnjqpdhjehnnneenhjpccccccoooa`aehleege`a", -"aaoigggijhhbeejnhnnenenhjgcgigccphn`oa``alnhgh`a", -"aa`iigggiqenehnnhnneehhnqccqgccchjccolaahehbg`aa", -"aa`giggggifhhnehejmpnnnbqpcpccphljccjhaenhnih`aa", -"aa`higgggiqlneenbmmnjmmhqgcccblleqccfllnhbgiaaaa", -"aaaoiigggiqhnnnejimmmmm`fipcccccccccehh`fgin`aaa", -"aaaoeigggighebnejimmmmn`lfggcccccccph`ljgiioaaaa", -"aaaaofiggginnnhegmmqmmmhhhnpggpcpgghllqgiioaaaaa", -"aaaaa`jigginnnnqgmmimmmmhh`hpppppghohqgigaaaaaaa", -"aaaaaa`qigiflhhhbmejqmmmmhpfm`nnh``hqgiq`aaaaaaa", -"aaaaaaa`giiijhhhhhhbqgmmmmjmmhhl`lfqgij`aaaaaaaa", -"aaaaaaaaaiiiifhhhnhhnqgmmmmmm`lhleqgif`aaaaaaaaa", -"aaaaaaaaaaiiiijl`hhlhnjgmmmmh`lhbqginoaaaaaaaaaa", -"aaaaaaaaaaoiiiiflhnhh`hfqmgjh`hfqgih`aaaaaaaaaaa", -"aaaaaaaaaaaoiiiiflhhhlhhhhnh`hqqgilaaaaaaaaaaaaa", -"aaaaaaaaaaaaoiigieohnhnhhhllnqggi`aaaaaaaaaaaaaa", -"aaaaaaaaaaaaa`iiiiflhnnhll`ngqgi`aaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaliigieohnnh`ngqgioaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaahiiiinoh``ngqigoaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaonigiib`hfggig`aaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaobigiiffqgij`aaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaa`jigigjgif`aaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaa`gigqqin`aaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaa`iiiin`aaaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaaa`iihaaaaaaaaaaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaaaaaa`oo`aaaaaaaaaaaaaaaaaaaaaaaa" -}; +/* XPM */ +static char *noname[] = { +/* width height ncolors chars_per_pixel */ +"48 47 18 1", +/* colors */ +"` c #858678", +"a c #B2C0DC", +"b c #3D4C41", +"c c #14E314", +"d c #E3DF2A", +"e c #4E5151", +"f c #3F3D3F", +"g c #101214", +"h c #686560", +"i c #020102", +"j c #2F3538", +"k c #A30E1C", +"l c #7D6F73", +"m c #00018D", +"n c #545851", +"o c #A19685", +"p c #356E3B", +"q c #242134", +/* pixels */ +"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaaaaaaaa`aaaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaaaakkkkig``aaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaa`kkggqfqiqo`aaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaooqgkkgkkbfgifo`aaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaa``qggikkkkkjbffqgbaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaoqiqfgikkkkkfjbnejqqn`aaaaaaaaaaaa", +"aaaaaaaaaao`lggqeeebkkkkkkkkqjgjbfiboaaaaaaaaaaa", +"aaaaaaaaaahdpbqgqqjebbpbkkkkkkkkbegoaaaaaaaaaaaa", +"aaaaaaaaagiddddddbqqqjfbpfkkkkkkpeg`aaaaaaaaaaaa", +"aaaaaoafiiidbjhdddddpbqqqqgkkknpefq`aaaaaaaaaaaa", +"aaaoofiqfqgddqjgjdddddddhdpkkppeeqn`aaaaaaaaaaaa", +"`ooeggjebqgpdggpdddjppddddhfpbeebqoaaaaaaaaaaaaa", +"abgqjbbfbqgqdpddd`ejjjdddhebnneeejeaaaaaaaaaaaaa", +"oibeefefefggddddnjjegpd`ejeenefenfjfl`aaaaaaaaaa", +"aiqnebbfneqgbdhmjjbhenhjeneeeenbgqa`eqaaaaaaaaaa", +"`gijebffnnqqjdegbeeeenneeeebfnejlhooejqhaaaaaaaa", +"o`iijnefenqqgddddefnenhnefeenhifa`afjnngqaaaaaaa", +"aoiiijhnfnbggddddfnenneeebnehqioaa`afjnhegn`aaaa", +"a`iigiqnefggpdd`jeheennenhebcccphla```qjffqfaoaa", +"a`figiiqnnjqpdhjehnnneenhjpccccccoooa`aehleege`a", +"aaoigggijhhbeejnhnnenenhjgcgigccphn`oa``alnhgh`a", +"aa`iigggiqenehnnhnneehhnqccqgccchjccolaahehbg`aa", +"aa`giggggifhhnehejmpnnnbqpcpccphljccjhaenhnih`aa", +"aa`higgggiqlneenbmmnjmmhqgcccblleqccfllnhbgiaaaa", +"aaaoiigggiqhnnnejimmmmm`fipcccccccccehh`fgin`aaa", +"aaaoeigggighebnejimmmmn`lfggcccccccph`ljgiioaaaa", +"aaaaofiggginnnhegmmqmmmhhhnpggpcpgghllqgiioaaaaa", +"aaaaa`jigginnnnqgmmimmmmhh`hpppppghohqgigaaaaaaa", +"aaaaaa`qigiflhhhbmejqmmmmhpfm`nnh``hqgiq`aaaaaaa", +"aaaaaaa`giiijhhhhhhbqgmmmmjmmhhl`lfqgij`aaaaaaaa", +"aaaaaaaaaiiiifhhhnhhnqgmmmmmm`lhleqgif`aaaaaaaaa", +"aaaaaaaaaaiiiijl`hhlhnjgmmmmh`lhbqginoaaaaaaaaaa", +"aaaaaaaaaaoiiiiflhnhh`hfqmgjh`hfqgih`aaaaaaaaaaa", +"aaaaaaaaaaaoiiiiflhhhlhhhhnh`hqqgilaaaaaaaaaaaaa", +"aaaaaaaaaaaaoiigieohnhnhhhllnqggi`aaaaaaaaaaaaaa", +"aaaaaaaaaaaaa`iiiiflhnnhll`ngqgi`aaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaliigieohnnh`ngqgioaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaahiiiinoh``ngqigoaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaonigiib`hfggig`aaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaobigiiffqgij`aaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaa`jigigjgif`aaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaa`gigqqin`aaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaa`iiiin`aaaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaaa`iihaaaaaaaaaaaaaaaaaaaaaaaa", +"aaaaaaaaaaaaaaaaaaaa`oo`aaaaaaaaaaaaaaaaaaaaaaaa" +}; diff --git a/x11-wm/afterstep/files/penguin.xpm b/x11-wm/afterstep/files/penguin.xpm index 13401bd352b6..c7282cf09414 100644 --- a/x11-wm/afterstep/files/penguin.xpm +++ b/x11-wm/afterstep/files/penguin.xpm @@ -1,73 +1,73 @@ -/* XPM */ -static char *noname[] = { -/* width height ncolors chars_per_pixel */ -"48 48 18 1", -/* colors */ -"` c #000000", -"a c #F3BD14", -"b c #828796", -"c c #B2C0DC", -"d c #221C1D", -"e c #160011", -"f c #685A5E", -"g c #A0A3AC", -"h c #F6F6F3", -"i c #6E727E", -"j c #040304", -"k c #FCFCF7", -"l c #A28359", -"m c #DFCF80", -"n c #E3EDF1", -"o c #FFFFFF", -"p c #E1B11E", -"q c #EEEEED", -/* pixels */ -"cccccccccccccccccccccccjjjjjjjjccccccccccccccccc", -"ccnooooooooooooooooooojjjjjjjffjoooooooooooooodc", -"cnqqqnqqqnqqqnqqqnqqqjjjjjjjjjfdjqqqqqnqhhhhhidc", -"conqnhnqnhnqnhnqnhnqjjjjjejjjjjjjjnnqnhnhhhhhidc", -"coqnqqqnqqqnqqqnqqqnjjjjjjjjjjjjjjqqnqqqhhhhgidc", -"conhnqnhnqnhnqnhnqnhjjjdjjjjjjjjjjjnhnqnnhhggidc", -"coqqqn``````````````jdgidjjigcfdjjj``````fgggidc", -"conqnh`iiiiiiiibibbbjhnhhjdqhhgjjjjbbbbbiobggidc", -"coqnqq`iiiiiiibbbbbbjcjdhddhjbhdjjjff`diioggcidc", -"conhnq`iiiibbbbbgbggjcjdfdehjbnfjjjf`dffiogcgidc", -"coqqqn`iiibbbbbbggggjdflaaaajihjjjjeeddfiocggidc", -"conqnh`iibbbggggggggjjpaaaaaappjjjj`ddffiogcgidc", -"coqnqq`ibbbbbgggggggjlpaaaaaappejjjddfffiocggidc", -"conhnq`ibbbgggbggbggjdpaaaaalppjjdjffffiiogggidc", -"coqqqn`ibbbgggbggbggdifpaalpppmdjjfjffiiiogggidc", -"conqnh`bbbggggggggggdbclpppgmcncjjjjdiiiiogggidc", -"coqnqq`ibbbgggbggbggjbncllgcchhhdjjjjiiiiogggidc", -"conhnq`bbbgggggggggdjqhccccnhhhhqjjejjiiiogggiec", -"coqqqn`ibbbbggbbgbdjghkhcchhhhhhkjjjjjiiiogggfdc", -"conqnh`ibbgbgggbgbjdhhhhhhhhkhhhhgjjjjjiiogggiec", -"coqnqq`ibbbbbgbgcjjbhhhkkhkkhhhhhqjjjjjjiogggfdc", -"conhnq`iibbbbbggjjjgcqhhnnhhhccccndjjjjjdogggiec", -"coqqqn`iiibbbbbbjjdckhhhqhhhkhhncchjdjjjjogggfec", -"conqnh`iiibbbbbjjjghhkqhhhhhhhhhkncjjjjjjjggbfec", -"coqnqq`iiiiibbbjdjhhhkkkhhhhkhhkhknnjjjjjjgggfec", -"conhnq`iiiiiibijjbhhhhkhhhkkhhhhhkhhdjjjjjbgbfjc", -"coqqqn`iiiiiiijdjhhhhkhqhkhhhkhhkhkhdjjjjjjbbfec", -"conqnn`iiiiiiijjfhhhhhhnkhkhhhhhhhhhfjjjjjjgbfjc", -"coqnqn`iiiiiijjjchhkhkhnhhhhhhkhhhhhbjjjjjjbbfec", -"connnn`iiiiiijdjqhhhkhhnhhhhhhkkhhhhgjjjjjjjbf`c", -"coqnnn`iiiiijjdjqhhhhkhnhhhhkhhkhhkhcjjjjjjjbfec", -"connnn`iiiiijjdjnhhkhhhnkhhhhhhhhhhhnjjjjjjjbf`c", -"connnngooooojpfdhkhhhkhnhhhhhhhhhhhhbdjjjjjjbf`c", -"connnnncncccpaalfhkhkhhnhhhhhhhhhhmpljjjjjjbbf`c", -"connncnccccmpaaafdhhhhknhhhhhhhhhhpapjjjjjpabf`c", -"connncccccmppaaaaejqhhhhhhhkhhhhhhpapejjjfaaif`c", -"cogiiiiilpppaaaaapjjnhkhkhhhhhkhhcpaplddlpaaff`c", -"ci`````ppaaaaaaaaadjjfqhhhhhkhhhhclppppppaaaa``c", -"cccccccaaaaaaaaaaapejjqhhhhhhhhhkclpppppaaaaaacc", -"cccccccpaaaaaaaaaaaljjqkhhhhhhkhhglpaaaaaaaaaapc", -"cccccccpaaaaaaaaaaaamhhhhkhhhhhhgjlpaaaaaaaaaaaa", -"cccccccpaaaaaaaaaaaapqhhkkhhhhhdjelpaaaaaaaaaaac", -"cccccccpaaaaaaaaaaaapfhhhkhhhbjjjelpaaaaaaaaaacc", -"cccccccpppaaaaaaaaaapljjjjjjjjjjjdppaaaaaaapcccc", -"ccccccclpppppppaaaappfejjjjjjjjjjdlpaaaapplccccc", -"ccccccci```lllpppppplfejj```````jdfppppplccccccc", -"ccccccccccccccffllllffccccccccccccdlplplcccccccc", -"cccccccccccccccccdfdfccccccccccccccdffdccccccccc" -}; +/* XPM */ +static char *noname[] = { +/* width height ncolors chars_per_pixel */ +"48 48 18 1", +/* colors */ +"` c #000000", +"a c #F3BD14", +"b c #828796", +"c c #B2C0DC", +"d c #221C1D", +"e c #160011", +"f c #685A5E", +"g c #A0A3AC", +"h c #F6F6F3", +"i c #6E727E", +"j c #040304", +"k c #FCFCF7", +"l c #A28359", +"m c #DFCF80", +"n c #E3EDF1", +"o c #FFFFFF", +"p c #E1B11E", +"q c #EEEEED", +/* pixels */ +"cccccccccccccccccccccccjjjjjjjjccccccccccccccccc", +"ccnooooooooooooooooooojjjjjjjffjoooooooooooooodc", +"cnqqqnqqqnqqqnqqqnqqqjjjjjjjjjfdjqqqqqnqhhhhhidc", +"conqnhnqnhnqnhnqnhnqjjjjjejjjjjjjjnnqnhnhhhhhidc", +"coqnqqqnqqqnqqqnqqqnjjjjjjjjjjjjjjqqnqqqhhhhgidc", +"conhnqnhnqnhnqnhnqnhjjjdjjjjjjjjjjjnhnqnnhhggidc", +"coqqqn``````````````jdgidjjigcfdjjj``````fgggidc", +"conqnh`iiiiiiiibibbbjhnhhjdqhhgjjjjbbbbbiobggidc", +"coqnqq`iiiiiiibbbbbbjcjdhddhjbhdjjjff`diioggcidc", +"conhnq`iiiibbbbbgbggjcjdfdehjbnfjjjf`dffiogcgidc", +"coqqqn`iiibbbbbbggggjdflaaaajihjjjjeeddfiocggidc", +"conqnh`iibbbggggggggjjpaaaaaappjjjj`ddffiogcgidc", +"coqnqq`ibbbbbgggggggjlpaaaaaappejjjddfffiocggidc", +"conhnq`ibbbgggbggbggjdpaaaaalppjjdjffffiiogggidc", +"coqqqn`ibbbgggbggbggdifpaalpppmdjjfjffiiiogggidc", +"conqnh`bbbggggggggggdbclpppgmcncjjjjdiiiiogggidc", +"coqnqq`ibbbgggbggbggjbncllgcchhhdjjjjiiiiogggidc", +"conhnq`bbbgggggggggdjqhccccnhhhhqjjejjiiiogggiec", +"coqqqn`ibbbbggbbgbdjghkhcchhhhhhkjjjjjiiiogggfdc", +"conqnh`ibbgbgggbgbjdhhhhhhhhkhhhhgjjjjjiiogggiec", +"coqnqq`ibbbbbgbgcjjbhhhkkhkkhhhhhqjjjjjjiogggfdc", +"conhnq`iibbbbbggjjjgcqhhnnhhhccccndjjjjjdogggiec", +"coqqqn`iiibbbbbbjjdckhhhqhhhkhhncchjdjjjjogggfec", +"conqnh`iiibbbbbjjjghhkqhhhhhhhhhkncjjjjjjjggbfec", +"coqnqq`iiiiibbbjdjhhhkkkhhhhkhhkhknnjjjjjjgggfec", +"conhnq`iiiiiibijjbhhhhkhhhkkhhhhhkhhdjjjjjbgbfjc", +"coqqqn`iiiiiiijdjhhhhkhqhkhhhkhhkhkhdjjjjjjbbfec", +"conqnn`iiiiiiijjfhhhhhhnkhkhhhhhhhhhfjjjjjjgbfjc", +"coqnqn`iiiiiijjjchhkhkhnhhhhhhkhhhhhbjjjjjjbbfec", +"connnn`iiiiiijdjqhhhkhhnhhhhhhkkhhhhgjjjjjjjbf`c", +"coqnnn`iiiiijjdjqhhhhkhnhhhhkhhkhhkhcjjjjjjjbfec", +"connnn`iiiiijjdjnhhkhhhnkhhhhhhhhhhhnjjjjjjjbf`c", +"connnngooooojpfdhkhhhkhnhhhhhhhhhhhhbdjjjjjjbf`c", +"connnnncncccpaalfhkhkhhnhhhhhhhhhhmpljjjjjjbbf`c", +"connncnccccmpaaafdhhhhknhhhhhhhhhhpapjjjjjpabf`c", +"connncccccmppaaaaejqhhhhhhhkhhhhhhpapejjjfaaif`c", +"cogiiiiilpppaaaaapjjnhkhkhhhhhkhhcpaplddlpaaff`c", +"ci`````ppaaaaaaaaadjjfqhhhhhkhhhhclppppppaaaa``c", +"cccccccaaaaaaaaaaapejjqhhhhhhhhhkclpppppaaaaaacc", +"cccccccpaaaaaaaaaaaljjqkhhhhhhkhhglpaaaaaaaaaapc", +"cccccccpaaaaaaaaaaaamhhhhkhhhhhhgjlpaaaaaaaaaaaa", +"cccccccpaaaaaaaaaaaapqhhkkhhhhhdjelpaaaaaaaaaaac", +"cccccccpaaaaaaaaaaaapfhhhkhhhbjjjelpaaaaaaaaaacc", +"cccccccpppaaaaaaaaaapljjjjjjjjjjjdppaaaaaaapcccc", +"ccccccclpppppppaaaappfejjjjjjjjjjdlpaaaapplccccc", +"ccccccci```lllpppppplfejj```````jdfppppplccccccc", +"ccccccccccccccffllllffccccccccccccdlplplcccccccc", +"cccccccccccccccccdfdfccccccccccccccdffdccccccccc" +}; diff --git a/x11/aterm/Makefile b/x11/aterm/Makefile index 42a6ff580630..af04a6253843 100644 --- a/x11/aterm/Makefile +++ b/x11/aterm/Makefile @@ -1,53 +1,56 @@ # Created by: Jim Mock # $FreeBSD$ PORTNAME= aterm PORTVERSION= 1.0.1 PORTREVISION= 7 CATEGORIES= x11 MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Color vt102 terminal emulator with transparency support MAKE_JOBS_UNSAFE= yes +USES= dos2unix +DOS2UNIX_FILES= src/rxvt.h + USE_XORG= xpm GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-wtmp \ --enable-xgetdefault \ --disable-memset \ --disable-swapscreen \ --disable-thai \ --without-afterstep-config \ --disable-utmp CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFINE= TRANS BSDEL MOUSE BGIMG KANJI BIG5S GREEK OPTIONS_DEFAULT= TRANS BSDEL MOUSE TRANS_DESC= Transparency support BSDEL_DESC= BSD-style backspace and delete BGIMG_DESC= XPM, JPEG, PNG backgrounds KANJI_DESC= Kanji (EUC-JP or SJIS) support BIG5S_DESC= Chinese character (BIG5) support GREEK_DESC= Greek keyboard support PLIST_FILES= bin/aterm \ man/man1/aterm.1.gz TRANS_CONFIGURE_ENABLE= transparency BSDEL_CONFIGURE_OFF= --disable-backspace-key --disable-delete-key BSDEL_CONFIGURE_ON= --enable-backspace-key --enable-delete-key MOUSE_CONFIGURE_ENABLE= mousewheel BGIMG_LIB_DEPENDS= libAfterImage.so:graphics/libafterimage \ libpng.so:graphics/png BGIMG_USES= jpeg BGIMG_CONFIGURE_ON= --with-afterimage-config --with-png --with-jpeg BGIMG_CONFIGURE_OFF= --without-afterimage-config --with-png=no --with-jpeg=no KANJI_CONFIGURE_ENABLE= kanji BIG5S_CONFIGURE_ENABLE= big5 GREEK_CONFIGURE_ENABLE= greek .include diff --git a/x11/aterm/files/patch-cutToBeginningOfLine b/x11/aterm/files/patch-cutToBeginningOfLine index 2be191df4c38..4f70287baef4 100644 --- a/x11/aterm/files/patch-cutToBeginningOfLine +++ b/x11/aterm/files/patch-cutToBeginningOfLine @@ -1,56 +1,56 @@ diff -urNad aterm-1.0.1~/src/rxvt.h src/rxvt.h --- src/rxvt.h 2007-08-03 23:55:28.000000000 +0200 +++ src/rxvt.h 2007-08-03 23:56:36.000000000 +0200 @@ -784,6 +784,7 @@ - #define Opt_scrollKeypress (1LU<<12) - #define Opt_transparent (1LU<<13) - #define Opt_transparent_sb (1LU<<14) -+#define Opt_cutToBeginningOfLine (1LU<<15) - #define Opt_borderLess (1LU<<16) - - /* place holder used for parsing command-line options */ + #define Opt_scrollKeypress (1LU<<12) + #define Opt_transparent (1LU<<13) + #define Opt_transparent_sb (1LU<<14) ++#define Opt_cutToBeginningOfLine (1LU<<15) + #define Opt_borderLess (1LU<<16) + + /* place holder used for parsing command-line options */ diff -urNad aterm-1.0.1~/src/screen.c src/screen.c --- aterm-1.0.1~/src/screen.c 2007-08-03 23:55:28.000000000 +0200 +++ src/screen.c 2007-08-04 00:02:35.000000000 +0200 @@ -3155,7 +3155,7 @@ text_t *stp; rend_t *srp; - if (selection.clicks != 2) + if (selection.clicks < 2) return; /* Go away: we only handle double clicks */ if (dirn == UP) { @@ -3454,7 +3454,11 @@ } else if (selection.clicks == 3) { if (ROWCOL_IS_AFTER(selection.mark, selection.beg)) selection.mark.col++; - selection.beg.col = 0; + if (Options & Opt_cutToBeginningOfLine) { + selection_delimit_word(UP, &(selection.beg), &(selection.beg)); + } else { + selection.beg.col = 0; + } selection.end.col = TermWin.bcol; } if (button3 && buttonpress) { /* mark may need to be changed */ diff -urNad aterm-1.0.1~/src/xdefaults.c src/xdefaults.c --- aterm-1.0.1~/src/xdefaults.c 2007-08-03 23:55:28.000000000 +0200 +++ src/xdefaults.c 2007-08-04 00:03:23.000000000 +0200 @@ -70,6 +70,7 @@ #endif static const char *rs_visualBell = NULL; static const char *rs_reverseVideo = NULL; +static const char *rs_cutToBeginningOfLine = NULL; #ifdef META8_OPTION static const char *rs_meta8 = NULL; @@ -327,6 +328,8 @@ BOOL(rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"), BOOL(rs_visualBell, "visualBell", "vb", Opt_visualBell, "visual bell"), + BOOL(rs_cutToBeginningOfLine, "cutToBeginningOfLine", "cb", Opt_cutToBeginningOfLine, + "cut to beginning of line"), #ifndef NO_MAPALERT # ifdef MAPALERT_OPTION diff --git a/x11/aterm/files/patch-eterm_transparency b/x11/aterm/files/patch-eterm_transparency index 0c4e6b0f0558..c4ea4fb1768f 100644 --- a/x11/aterm/files/patch-eterm_transparency +++ b/x11/aterm/files/patch-eterm_transparency @@ -1,96 +1,96 @@ diff -urNad aterm-1.0.1~/src/main.c src/main.c --- aterm-1.0.1~/src/main.c 2007-08-04 00:05:30.000000000 +0200 +++ src/main.c 2007-08-04 00:09:53.000000000 +0200 @@ -1334,6 +1334,12 @@ break; #endif + case XTerm_EtermSeq: + op = atoi(str); + if (!(str = strchr(str, ';'))) + break; + eterm_seq(op, str + 1); + break; case XTerm_Menu: /* * menubar_dispatch() violates the constness of the string, @@ -1360,6 +1366,43 @@ break; } } + +/* + * Eterm escape sequences: ESC ] 6;Ps;Pt BEL + * 2 = set shade/tint mask + * (There are more codes--check Eterm's reference doc.) + */ +/* PROTO */ + void +eterm_seq(int op, const char *str) +{ + assert(str != NULL); + switch (op) { +#if defined(BACKGROUND_IMAGE) || defined(TRANSPARENT) + case 2: + /* { shade | tint } [ class ; ] value */ + if (strncmp(str, "tint", 4) == 0) { + char *class; + char *value; + + if (!(class = strchr((char *) str, ';'))) + break; + *class++ = '\0'; + if (!(value = strchr(class, ';'))) { + /* Default class is bg. */ + value = class; + class = "bg"; + } else + *value++ = '\0'; + + if (strcmp(class, "bg") == 0) { + set_window_color(Color_tint, value); + } + } + break; +#endif + } +} /*}}} */ diff -urNad aterm-1.0.1~/src/rxvt.h src/rxvt.h --- aterm-1.0.1~/src/rxvt.h 2007-08-04 00:05:30.000000000 +0200 +++ src/rxvt.h 2007-08-04 00:10:31.000000000 +0200 @@ -807,6 +807,7 @@ - /* - * rxvt extensions of XTerm escape sequences: ESC ] Ps;Pt BEL - */ -+#define XTerm_EtermSeq 6 /* Eterm proprietary escape sequences */ - #define XTerm_Menu 10 /* set menu item */ - #define XTerm_Pixmap 20 /* new bg pixmap */ - #define XTerm_restoreFG 39 /* change default fg color */ + /* + * rxvt extensions of XTerm escape sequences: ESC ] Ps;Pt BEL + */ ++#define XTerm_EtermSeq 6 /* Eterm proprietary escape sequences */ + #define XTerm_Menu 10 /* set menu item */ + #define XTerm_Pixmap 20 /* new bg pixmap */ + #define XTerm_restoreFG 39 /* change default fg color */ diff -urNad aterm-1.0.1~/src/screen.c src/screen.c --- aterm-1.0.1~/src/screen.c 2007-08-04 00:05:30.000000000 +0200 +++ src/screen.c 2007-08-04 00:15:22.000000000 +0200 @@ -2665,7 +2665,20 @@ !(Options & Opt_transparent)) { XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[Color_bg]); - } + } else if (idx == Color_tint) { + XColor tint; + + tint.pixel = PixColors[Color_tint]; + XQueryColor(Xdisplay, Xcmap, &tint); + if (TermWin.background.Shading.tintColor.red == tint.red && + TermWin.background.Shading.tintColor.green == tint.green && + TermWin.background.Shading.tintColor.blue == tint.blue) { + return; + } + TermWin.background.Shading.tintColor = tint; + RenderPixmap(0); + } + /* handle Color_BD, scrollbar background, etc. */ diff --git a/x11/imwheel/Makefile b/x11/imwheel/Makefile index 566ab35a2ef3..f47b2a5a1393 100644 --- a/x11/imwheel/Makefile +++ b/x11/imwheel/Makefile @@ -1,33 +1,34 @@ # Created by: jhb # $FreeBSD$ PORTNAME= imwheel DISTVERSION= 1.0.0pre12 PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= ftp://jcatki.no-ip.org/pub/imwheel/ \ SF/${PORTNAME}/${PORTNAME}-source/${DISTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Utility to translate mouse wheel actions into X keyboard events LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING USE_XORG= x11 xpm xtst xext xmu -USES= gmake +USES= dos2unix gmake +DOS2UNIX_FILES= getopt/getopt.c GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-gpm OPTIONS_DEFINE= DOCS post-patch: .for i in imwheel.1 util.c @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i} .endfor post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/EMACS ${STAGEDIR}${DOCSDIR} .include diff --git a/x11/imwheel/files/patch-Makefile.in b/x11/imwheel/files/patch-Makefile.in index ea5f4bb8d54b..a6bd1d2cb2f0 100644 --- a/x11/imwheel/files/patch-Makefile.in +++ b/x11/imwheel/files/patch-Makefile.in @@ -1,24 +1,24 @@ ---- Makefile.in.orig 2004-08-29 18:36:33.000000000 +0800 -+++ Makefile.in 2014-01-09 21:48:23.000000000 +0800 +--- Makefile.in.orig 2004-08-29 10:36:33 UTC ++++ Makefile.in @@ -215,7 +215,7 @@ imwheel_LDADD = @GETOPT_LIBS@ -L$(top_bu imwheel_DEPENDENCIES = imwheel.o util.o cfg.o jax/libjax.a man_MANS = imwheel.1 EXTRA_DIST = BUGS FREEBSD EMACS M-BA47 BUGS see imwheel.1.html imwheel.1 TODO imwheelrc @extras_dist@ @mdump_dist@ lefty.sh imwheel.spec slack.sh -ETCDIR = /etc/X11/imwheel +ETCDIR = ${PREFIX}/etc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -782,9 +782,9 @@ install-exec-hook: @SUID_TRUE@ chown @suid@ $$progname ; \ @SUID_TRUE@ chmod u+s $$progname $(mkinstalldirs) $(ETCDIR) - -[ -f /etc/imwheelrc ] && mv /etc/imwheelrc $(ETCDIR)/imwheelrc || true - -[ -f /etc/X11/imwheelrc ] && mv /etc/X11/imwheelrc $(ETCDIR)/imwheelrc || true - -[ -f $(ETCDIR)/imwheelrc ] && install -m 644 imwheelrc $(ETCDIR)/imwheelrc.new || install -m 644 imwheelrc $(ETCDIR)/imwheelrc + -[ -f /etc/imwheelrc ] && mv /etc/imwheelrc $(DESTDIR)$(ETCDIR)/imwheelrc || true + -[ -f /etc/X11/imwheelrc ] && mv /etc/X11/imwheelrc $(DESTDIR)$(ETCDIR)/imwheelrc || true + -[ -f $(ETCDIR)/imwheelrc ] && install -m 644 imwheelrc $(DESTDIR)$(ETCDIR)/imwheelrc.new || install -m 644 imwheelrc $(DESTDIR)$(ETCDIR)/imwheelrc extras: $(EXTRA_PROGRAMS) diff --git a/x11/imwheel/files/patch-getopt__Makefile.in b/x11/imwheel/files/patch-getopt_Makefile.in similarity index 65% rename from x11/imwheel/files/patch-getopt__Makefile.in rename to x11/imwheel/files/patch-getopt_Makefile.in index b1e87ba485c8..9254a81feb1a 100644 --- a/x11/imwheel/files/patch-getopt__Makefile.in +++ b/x11/imwheel/files/patch-getopt_Makefile.in @@ -1,12 +1,11 @@ ---- getopt/Makefile.in.orig Sun Aug 29 06:33:21 2004 -+++ getopt/Makefile.in Sun Nov 7 08:57:49 2004 -@@ -161,7 +161,7 @@ +--- getopt/Makefile.in.orig 2004-08-29 10:33:21 UTC ++++ getopt/Makefile.in +@@ -161,7 +161,7 @@ subdirs = @subdirs@ suid = @suid@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -AM_CFLAGS = -O6 -s -Wall +#AM_CFLAGS = -O6 -s -Wall noinst_LIBRARIES = libgetopt.a libgetopt_a_SOURCES = getopt.c getopt1.c getopt.h EXTRA_DIST = Makefile.unix - diff --git a/x11/imwheel/files/patch-getopt__getopt.c b/x11/imwheel/files/patch-getopt_getopt.c similarity index 77% rename from x11/imwheel/files/patch-getopt__getopt.c rename to x11/imwheel/files/patch-getopt_getopt.c index 47198b724f93..aa8b79e8ca3d 100644 --- a/x11/imwheel/files/patch-getopt__getopt.c +++ b/x11/imwheel/files/patch-getopt_getopt.c @@ -1,16 +1,16 @@ ---- getopt/getopt.c.orig Tue Apr 6 05:22:57 1999 -+++ getopt/getopt.c Fri Jun 29 01:22:22 2001 -@@ -166,11 +166,12 @@ - /* Value of POSIXLY_CORRECT environment variable. */ - static char *posixly_correct; - --#ifdef __GNU_LIBRARY__ -+#if defined(__GNU_LIBRARY__) || defined(__FreeBSD__) - /* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -+#include - #include - #define my_index strchr - #else +--- getopt/getopt.c.orig 2016-06-20 12:59:05 UTC ++++ getopt/getopt.c +@@ -166,11 +166,12 @@ static enum + /* Value of POSIXLY_CORRECT environment variable. */ + static char *posixly_correct; + +-#ifdef __GNU_LIBRARY__ ++#if defined(__GNU_LIBRARY__) || defined(__FreeBSD__) + /* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ ++#include + #include + #define my_index strchr + #else diff --git a/x11/imwheel/files/patch-imwheel.1 b/x11/imwheel/files/patch-imwheel.1 index b8dad75d9412..b757dd4fc66d 100644 --- a/x11/imwheel/files/patch-imwheel.1 +++ b/x11/imwheel/files/patch-imwheel.1 @@ -1,21 +1,20 @@ ---- imwheel.1.orig Sun Nov 7 08:47:14 2004 -+++ imwheel.1 Sun Nov 7 08:49:03 2004 -@@ -329,7 +329,7 @@ +--- imwheel.1.orig 2004-06-10 01:41:49 UTC ++++ imwheel.1 +@@ -329,7 +329,7 @@ sum = 0 .fi .RE .SH "IMWHEELRC" -IMWheel uses, optionally, two configuration files. One called /etc/X11/imwheel/imwheelrc, +IMWheel uses, optionally, two configuration files. One called %%PREFIX%%/etc/imwheelrc, which is used for everybody. The other is $HOME/.imwheelrc, used only for one user. One is supplied and should have been installed automatically in /etc/X11/imwheel/ if not also in the installing users $HOME as well. All whitespace is ignored -@@ -671,7 +671,7 @@ +@@ -671,7 +671,7 @@ Jonathan Atkins $HOME/.imwheelrc - The users configuration file. - + The users configuration file. + -/etc/X11/imwheel/imwheelrc +%%PREFIX%%/etc/imwheelrc - The global location for the configuration - file, it is always loaded. Overided by - the users configuration file. - + The global location for the configuration + file, it is always loaded. Overided by + the users configuration file. diff --git a/x11/imwheel/files/patch-imwheelrc b/x11/imwheel/files/patch-imwheelrc index 8aa449a9517e..ee374d695796 100644 --- a/x11/imwheel/files/patch-imwheelrc +++ b/x11/imwheel/files/patch-imwheelrc @@ -1,34 +1,34 @@ ---- imwheelrc.orig Wed Feb 23 15:14:20 2000 -+++ imwheelrc Wed Feb 23 15:25:12 2000 -@@ -34,6 +34,10 @@ +--- imwheelrc.orig 2004-06-10 01:41:49 UTC ++++ imwheelrc +@@ -96,6 +96,10 @@ Control_L, Down, C None, Down, KP_Subtract None, Up, KP_Add +"^fxtv" +None, Down, KP_Subtract +None, Up, KP_Add + "^Xman" None, Down, F Shift_L, Down, 3 -@@ -52,14 +56,14 @@ +@@ -138,14 +142,14 @@ None, Up, Shift_L|Page_Up None, Down, Shift_L|Page_Down "^rxvt" -Alt_L, Up, Shift_L|Page_Up -Alt_L, Down, Shift_L|Page_Down +None, Up, Shift_L|Page_Up +None, Down, Shift_L|Page_Down "^XTerm" -Alt_L, Up, Shift_R|Page_Up -Alt_L, Down, Shift_R|Page_Down -Alt_L, Left, Control_L|A -Alt_L, Right, Control_L|E +None, Up, Shift_R|Page_Up +None, Down, Shift_R|Page_Down +None, Left, Control_L|A +None, Right, Control_L|E #Shift_L, Down, Shift_L|1 - "^Netscape" + "^VMware" diff --git a/x11/imwheel/files/patch-util.c b/x11/imwheel/files/patch-util.c index 7bac7521304c..fa67129dda90 100644 --- a/x11/imwheel/files/patch-util.c +++ b/x11/imwheel/files/patch-util.c @@ -1,12 +1,11 @@ ---- util.c.orig Sun Aug 29 06:21:46 2004 -+++ util.c Sun Nov 7 09:10:33 2004 -@@ -735,7 +735,7 @@ - +--- util.c.orig 2004-08-29 10:21:46 UTC ++++ util.c +@@ -735,7 +735,7 @@ int file_allowed(char *fname) + struct WinAction *getRC() { - char fname[2][1024]={"","/etc/X11/imwheel/imwheelrc"}, line[1024], *p, *q, winid[1024]; + char fname[2][1024]={"","/usr/X11R6/etc/imwheelrc"}, line[1024], *p, *q, winid[1024]; - int fi,i; - struct WinAction *newwa=NULL; - FILE *f=NULL; - + int fi,i; + struct WinAction *newwa=NULL; + FILE *f=NULL;