Index: archivers/upx/Makefile =================================================================== RCS file: /home/ncvs/ports/archivers/upx/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- archivers/upx/Makefile 17 Feb 2004 03:05:12 -0000 1.1 +++ archivers/upx/Makefile 10 Oct 2004 02:34:27 -0000 @@ -6,7 +6,7 @@ # PORTNAME= upx -PORTVERSION= 1.24 +PORTVERSION= 1.25 CATEGORIES= archivers MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= upx/ @@ -27,7 +27,6 @@ PLIST_FILES= bin/upx post-patch: - @${CP} ${FILESDIR}/freebsd.h ${WRKSRC}/config_h @${CP} ${FILESDIR}/l_b_n2?.h ${WRKSRC}/stub post-build: Index: archivers/upx/distinfo =================================================================== RCS file: /home/ncvs/ports/archivers/upx/distinfo,v retrieving revision 1.1 diff -u -r1.1 distinfo --- archivers/upx/distinfo 17 Feb 2004 03:05:12 -0000 1.1 +++ archivers/upx/distinfo 10 Oct 2004 02:43:29 -0000 @@ -1,4 +1,4 @@ -MD5 (upx-1.24-src.tar.gz) = c7addf22766bdc9878e0a191855eec16 -SIZE (upx-1.24-src.tar.gz) = 222976 -MD5 (ucl-1.02.tar.gz) = e35efd120104c522acfd0e1a5c3ec091 -SIZE (ucl-1.02.tar.gz) = 513433 +SHA1 (upx-1.25-src.tar.gz) = 7ce05370efe969832d841a73dd165e6a4292f9d4 +RMD160 (upx-1.25-src.tar.gz) = 1c73a1eb8d98d32ef63ed351ca494526f895a9de +MD5 (upx-1.25-src.tar.gz) = 6f20a62999a46a1864652454b3c8a5d8 +SIZE (upx-1.25-src.tar.gz) = 250849 Index: archivers/upx/files/freebsd.h =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/freebsd.h,v retrieving revision 1.1 diff -u -r1.1 freebsd.h --- archivers/upx/files/freebsd.h 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/freebsd.h 10 Oct 2004 02:31:56 -0000 @@ -1,229 +0,0 @@ -/* pseudo for Linux */ - -#ifndef __UPX_CONFIG_H -#define __UPX_CONFIG_H - -/* $TOP$ */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your memcmp is broken. */ -/* #undef NO_MEMCMP */ - -/* Define to `long' if doesn't define. */ -/* #undef ptrdiff_t */ - -/* Define when using the dmalloc package. */ -/* #undef WITH_DMALLOC */ - -/* Define if you have the access function. */ -#define HAVE_ACCESS 1 - -/* Define if you have the atoi function. */ -#define HAVE_ATOI 1 - -/* Define if you have the chmod function. */ -#define HAVE_CHMOD 1 - -/* Define if you have the chown function. */ -#define HAVE_CHOWN 1 - -/* Define if you have the ctime function. */ -#define HAVE_CTIME 1 - -/* Define if you have the difftime function. */ -#define HAVE_DIFFTIME 1 - -/* Define if you have the fchmod function. */ -#define HAVE_FCHMOD 1 - -/* Define if you have the fileno function. */ -#define HAVE_FILENO 1 - -/* Define if you have the fstat function. */ -#define HAVE_FSTAT 1 - -/* Define if you have the XXX function. */ -#define HAVE_GETPID 1 - -/* Define if you have the XXX function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define if you have the getumask function. */ -/* #undef HAVE_GETUMASK */ - -/* Define if you have the gmtime function. */ -#define HAVE_GMTIME 1 - -/* Define if you have the index function. */ -#define HAVE_INDEX 1 - -/* Define if you have the isatty function. */ -#define HAVE_ISATTY 1 - -/* Define if you have the lstat function. */ -#define HAVE_LSTAT 1 - -/* Define if you have the localtime function. */ -#define HAVE_LOCALTIME 1 - -/* Define if you have the memcmp function. */ -#define HAVE_MEMCMP 1 - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE 1 - -/* Define if you have the memset function. */ -#define HAVE_MEMSET 1 - -/* Define if you have the mktime function. */ -#define HAVE_MKTIME 1 - -/* Define if you have the setmode function. */ -/* #undef HAVE_SETMODE */ - -/* Define if you have the stat function. */ -#define HAVE_STAT 1 - -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 - -/* Define if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME 1 - -/* Define if you have the stricmp function. */ -/* #undef HAVE_STRICMP */ - -/* Define if you have the strncasecmp function. */ -#define HAVE_STRNCASECMP 1 - -/* Define if you have the strnicmp function. */ -/* #undef HAVE_STRNICMP */ - -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define if you have the tzset function. */ -#define HAVE_TZSET 1 - -/* Define if you have the umask function. */ -#define HAVE_UMASK 1 - -/* Define if you have the utime function. */ -#define HAVE_UTIME 1 - -/* Define if you have the vsnprintf function. */ -#define HAVE_VSNPRINTF 1 - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define if you have the header file. */ -#define HAVE_CURSES_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_LINUX_KD_H 1 - -/* Define if you have the header file. */ -#define HAVE_LINUX_KDEV_T_H 1 - -/* Define if you have the header file. */ -#define HAVE_LINUX_MAJOR_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -#define HAVE_NCURSES_H 1 - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* $BOTTOM$ */ - -#if defined(HAVE_GMTIME) && !defined(TIME_WITH_SYS_TIME) -# undef /**/ HAVE_GMTIME -#endif - -#if defined(HAVE_LOCALTIME) && !defined(TIME_WITH_SYS_TIME) -# undef /**/ HAVE_LOCALTIME -#endif - -#if defined(HAVE_STRFTIME) && !defined(TIME_WITH_SYS_TIME) -# undef /**/ HAVE_STRFTIME -#endif - -#if defined(HAVE_SYS_RESOURCE_H) && !defined(TIME_WITH_SYS_TIME) -# undef /**/ HAVE_SYS_RESOURCE_H -#endif - -#if defined(HAVE_SYS_TIMES_H) && !defined(TIME_WITH_SYS_TIME) -# undef /**/ HAVE_SYS_TIMES_H -#endif - -#endif /* already included */ - -/* -vi:ts=4 -*/ Index: archivers/upx/files/patch-Makefile =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-Makefile,v retrieving revision 1.1 diff -u -r1.1 patch-Makefile --- archivers/upx/files/patch-Makefile 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-Makefile 10 Oct 2004 02:32:25 -0000 @@ -1,40 +1,10 @@ ---- Makefile.orig Mon Oct 28 16:43:34 2002 -+++ Makefile Tue Feb 17 08:20:39 2004 +--- Makefile.orig Sun Oct 10 13:21:36 2004 ++++ Makefile Sun Oct 10 13:27:00 2004 @@ -3,6 +3,7 @@ # # usage: # `make target=linux' # linux +# `make target=freebsd' # freebsd - # `make target=djggp2' # dos32 - djggp2 2.03 - # `make target=cygwin' # win32 - cygwin 1.3.x - # `make target=mingw32' # win32 - mingw32 -@@ -221,6 +222,29 @@ - - endif # linux - -+ -+### -+### FreeBSD -+### -+ -+ifeq ($(target),freebsd) -+override arch := $(shell uname -m | sed -e 's/^i[3456789]86$$/i386/') -+DEFS += '-DUPX_CONFIG_H="config_h/freebsd.h"' -+ -+ifeq ($(DEBUG),1) -+ ##CFLAGS += -O0 -gstabs+3 -+ ##CFLAGS += -O0 -gdwarf-2 -+ CFLAGS += -O0 -g -+else -+ ##LDFLAGS += -static -+ STUBEDIT_EXE = objcopy -S -R .comment -R .note $@ -+ ifeq ($(arch),i386) -+# STUBIFY_EXE = perl $(srcdir)/stub/scripts/brandelf.pl $@ -+ CHMOD_EXE = chmod 755 $@ -+ endif -+endif -+ -+endif # freebsd - - ### - ### Linux cross compilers + # `make target=dos32-djggp2' # dos32 - djggp2 + # `make target=win32-cygwin' # win32 - cygwin + # `make target=win32-mingw32' # win32 - mingw32 Index: archivers/upx/files/patch-Makefile.inc =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-Makefile.inc,v retrieving revision 1.1 diff -u -r1.1 patch-Makefile.inc --- archivers/upx/files/patch-Makefile.inc 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-Makefile.inc 10 Oct 2004 02:31:34 -0000 @@ -1,11 +0,0 @@ ---- Makefile.inc.orig Tue Feb 17 08:55:35 2004 -+++ Makefile.inc Tue Feb 17 08:54:46 2004 -@@ -22,7 +22,7 @@ - LIBDIRS += $(UDIR)/build/src/.libs - endif - ifneq ($(strip $(wildcard $(UDIR))),) --LIBDIRS += $(UDIR) -+LIBDIRS += $(UDIR)/lib - DOS_LIBDIRS := $(DOS_LIBDIRS);$(UDIR) - endif - Index: archivers/upx/files/patch-conf.h =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-conf.h,v retrieving revision 1.1 diff -u -r1.1 patch-conf.h --- archivers/upx/files/patch-conf.h 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-conf.h 9 Oct 2004 14:30:47 -0000 @@ -1,14 +1,5 @@ --- conf.h.orig Wed Jan 28 02:49:57 2004 +++ conf.h Tue Feb 17 06:24:41 2004 -@@ -109,7 +109,7 @@ - # define UPX_E_OK UCL_E_OK - # define UPX_E_ERROR UCL_E_ERROR - # define UPX_E_OUT_OF_MEMORY UCL_E_OUT_OF_MEMORY --# define __UPX_ENTRY __UCL_ENTRY -+# define __UPX_ENTRY - # endif - #endif - #if defined(WITH_NRV) @@ -518,6 +518,7 @@ #define UPX_F_BVMLINUZ_i386 16 #define UPX_F_ELKS_8086 17 Index: archivers/upx/files/patch-stub-Makefile =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-stub-Makefile,v retrieving revision 1.1 diff -u -r1.1 patch-stub-Makefile --- archivers/upx/files/patch-stub-Makefile 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-stub-Makefile 9 Oct 2004 14:34:48 -0000 @@ -1,5 +1,5 @@ ---- stub/Makefile.orig Wed Jan 28 03:28:03 2004 -+++ stub/Makefile Tue Feb 17 07:22:01 2004 +--- stub/Makefile.orig Fri Jun 25 05:35:35 2004 ++++ stub/Makefile Sun Oct 10 01:33:48 2004 @@ -27,6 +27,7 @@ l_djgpp2.h stubify.h \ l_exe.h \ @@ -8,9 +8,9 @@ l_sys.h \ l_t_n2b.h l_t_n2bs.h l_t_n2d.h l_t_n2ds.h l_t_n2e.h l_t_n2es.h \ l_tmt.h \ -@@ -81,6 +82,13 @@ +@@ -101,6 +102,12 @@ + CC_LINUX_I386 += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings CC_LINUX_I386 += -funsigned-char - ###CC_LINUX_I386 += -fwritable-strings -save-temps +# Compiler for the FreeBSD/386 stubs. +CC_FREEBSD_I386 = gcc -march=i386 -mcpu=i386 -Os -fno-strict-aliasing @@ -18,11 +18,10 @@ +CC_FREEBSD_I386 += -Werror +CC_FREEBSD_I386 += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings +CC_FREEBSD_I386 += -funsigned-char -+ - # Preprocessor for the a68k 68000-assembler. - CPP_M68K = gcc -I$(UCL_UPX) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional,-nostdinc -D__A68K__ - ASM_M68K = a68k -q -x -@@ -255,6 +263,31 @@ + + ### + ### Motorola 68000 +@@ -292,6 +299,31 @@ # /*********************************************************************** @@ -54,7 +53,7 @@ # // dependencies # ************************************************************************/ -@@ -274,10 +307,13 @@ +@@ -316,10 +348,13 @@ l_djgpp2.h: n2b_d32.asy n2d_d32.asy n2e_d32.asy $(DEPS2) l_exe.h: n2b_d8e.asy n2d_d8e.asy n2e_d8e.asy $(DEPS2) l_lx_n2b.h: n2b_d32.ash $(DEPS1) Index: archivers/upx/files/patch-stub-l_linux.c =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-stub-l_linux.c,v retrieving revision 1.1 diff -u -r1.1 patch-stub-l_linux.c --- archivers/upx/files/patch-stub-l_linux.c 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-stub-l_linux.c 10 Oct 2004 02:05:42 -0000 @@ -1,5 +1,5 @@ ---- stub/l_linux.c.orig Wed Jan 28 03:36:25 2004 -+++ stub/l_linux.c Tue Feb 17 07:27:42 2004 +--- stub/l_linux.c.orig Wed Jan 21 04:32:56 2004 ++++ stub/l_linux.c Sun Oct 10 01:37:35 2004 @@ -51,7 +51,11 @@ // note: we can assert(count > 0); do { @@ -100,9 +100,9 @@ #if defined(USE_MALLOC) +#if defined(__FreeBSD__) -+ buf = mmap(0, mmapsize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fdo, 0); ++ buf = (unsigned char *) mmap(0, mmapsize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fdo, 0); +#else - buf = mmap(malloc_args); + buf = (unsigned char *) mmap(malloc_args); +#endif if ((unsigned long) buf >= (unsigned long) -4095) goto error; Index: archivers/upx/files/patch-stub-linux.hh =================================================================== RCS file: /home/ncvs/ports/archivers/upx/files/patch-stub-linux.hh,v retrieving revision 1.1 diff -u -r1.1 patch-stub-linux.hh --- archivers/upx/files/patch-stub-linux.hh 17 Feb 2004 03:05:13 -0000 1.1 +++ archivers/upx/files/patch-stub-linux.hh 10 Oct 2004 02:48:13 -0000 @@ -1,54 +0,0 @@ ---- stub/linux.hh.orig Tue Feb 17 01:31:35 2004 -+++ stub/linux.hh Tue Feb 17 07:30:02 2004 -@@ -26,8 +26,8 @@ - */ - - --#if !defined(__linux__) || !defined(__i386__) --# error "this stub must be compiled under linux/i386" -+#if (!defined(__linux__) || !defined(__i386__)) && !defined(__FreeBSD__) -+# error "this stub must be compiled under linux/i386 or FreeBSD" - #endif - - -@@ -35,6 +35,16 @@ - // includes - **************************************************************************/ - -+#if defined(__FreeBSD__) -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#else - struct timex; - - #define __need_timeval -@@ -54,6 +64,7 @@ - - #define CONST_CAST(type, var) \ - ((type) ((unsigned long) (var))) -+#endif - - - /************************************************************************* -@@ -122,6 +133,7 @@ - #define PAGE_SIZE ( 1u<<12) - - -+#if !defined(__FreeBSD__) - /************************************************************************* - // syscalls - // -@@ -312,6 +324,7 @@ - - #undef Z0 - #undef Z1 -+#endif - - - /* diff -u /dev/null archivers/upx/files/patch-Makedefs.inc --- /dev/null Thu Jan 1 10:00:00 1970 +++ archivers/upx/files/patch-Makedefs.inc Sun Oct 10 01:27:39 2004 @@ -0,0 +1,11 @@ +--- Makedefs.inc.orig Tue Feb 17 08:55:35 2004 ++++ Makedefs.inc Tue Feb 17 08:54:46 2004 +@@ -22,7 +22,7 @@ + LIBDIRS += $(UDIR)/build/src/.libs + endif + ifneq ($(strip $(wildcard $(UDIR))),) +-LIBDIRS += $(UDIR) ++LIBDIRS += $(UDIR)/lib + DOS_LIBDIRS := $(DOS_LIBDIRS);$(UDIR) + endif + diff -u /dev/null upx/files/patch-Makefile.bld --- /dev/null Thu Jan 1 10:00:00 1970 +++ archivers/upx/files/patch-Makefile.bld Sun Oct 10 13:33:56 2004 @@ -0,0 +1,32 @@ +--- Makefile.bld.orig Fri Jun 25 05:35:14 2004 ++++ Makefile.bld Sun Oct 10 13:33:47 2004 +@@ -144,6 +144,29 @@ + include $(srcdir)/Makedefs.gcc + endif + ++### ++### freebsd - gcc ++### ++ ++ifeq ($(target),freebsd) ++include $(srcdir)/Makedefs.gcc ++override arch := $(shell uname -m | sed -e 's/^i[3456789]86$$/i386/') ++ifeq ($(arch),i386) ++ CCARCH += -march=i386 ++endif ++DEFS += -D_FILE_OFFSET_BITS=64 ++##CFLAGS_WERROR = -Werror ++ifeq ($(DEBUG),1) ++else ++ ##LDFLAGS += -static ++ STUBEDIT_EXE = objcopy -S -R .comment -R .note $@ ++ ifeq ($(arch),i386) ++## STUBIFY_EXE = perl $(srcdir)/stub/scripts/brandelf.pl $@ ++ endif ++endif ++CHMOD_EXE = chmod 755 $@ ++endif # freebsd ++ + + ### + ### linux - gcc