rebase cont (patch0): allow proper build

Version: 4.2.4.4-1
This commit is contained in:
Pavel Raiskup 2013-03-01 22:12:21 +01:00
parent 9ff80cf5f4
commit 1b6dc3c2bc
3 changed files with 41 additions and 54 deletions

View File

@ -1,37 +0,0 @@
diff -urNp ncompress-4.2.4-orig/Makefile.def ncompress-4.2.4/Makefile.def
--- ncompress-4.2.4-orig/Makefile.def 1992-10-28 12:10:52.000000000 +0100
+++ ncompress-4.2.4/Makefile.def 2010-02-23 13:38:39.000000000 +0100
@@ -1,13 +1,13 @@
# Makefile generated by build.
# C complier
-CC=cc
+CC=cc $(RPM_OPT_FLAGS)
# Install directory for binarys
-BINDIR=/usr/local/bin
+BINDIR=/usr/bin
# Install directory for manual
-MANDIR=/usr/local/man/man1
+MANDIR=/usr/man/man1
# compiler options:
# options is a collection of:
@@ -28,14 +28,14 @@ MANDIR=/usr/local/man/man1
# -DDEF_ERRNO=1 Define error (not defined in errno.h).
# -DMAXSEG_64K=1 -BITS=16 Support segment processsor like 80286.
#
-options= -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=3
+options= -DDIRENT=1 -DSYSDIR=1 -DUTIME_H=1 -DUSERMEM=800000 -DREGISTERS=20 -DIBUFSIZ=1024 -DOBUFSIZ=1024 -DBYTEORDER=$(ENDIAN)
# libary options
LBOPT=
compress: Makefile compress42.c patchlevel.h
- $(CC) -o compress $(options) "-DCOMPILE_DATE=\"`date`\"" compress42.c $(LBOPT)
+ $(CC) -o compress $(options) "-DCOMPILE_DATE=\"`date`\"" compress42.c
install: compress
[ -f $(BINDIR)/compress ] && \

View File

@ -0,0 +1,20 @@
diff --git a/Makefile.def b/Makefile.def
index e493d7c..1e6612f 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -31,7 +31,14 @@ MANDIR=/usr/local/man/man1
# -DDEF_ERRNO=1 Define error (not defined in errno.h).
# -DMAXSEG_64K=1 -BITS=16 Support segment processsor like 80286.
#
-options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=3
+options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=20 \
+ -D_FILE_OFFSET_BITS=64 \
+ -D_LARGEFILE_SOURCE \
+ -DNOFUNCDEF=1 \
+ -DOBUFSIZ=1024 \
+ -DUTIME_H \
+ -DSYSDIR=1 \
+ $(ARCH_FLAGS)
# libary options
LBOPT= $(LDFLAGS)

View File

@ -6,7 +6,11 @@ License: Public Domain
Group: Applications/File
URL: http://ncompress.sourceforge.net/
Source: http://prdownloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
Patch0: ncompress-4.2.4-make.patch
# allow to build ncompress
# ~> downstream
Patch0: ncompress-4.2.4.4-make.patch
Patch1: ncompress-4.2.4-lfs2.patch
Patch2: ncompress-4.2.4-filenamelen.patch
Patch3: ncompress-2GB.patch
@ -30,7 +34,21 @@ which are compatible with the original UNIX compress utility.
%prep
%setup -q
%patch0 -p1
# configure build system
# ~> downstream
%patch0 -p1 -b .configure-buildsystem
%ifarch sparc m68k armv4l ppc s390 s390x ppc64 sparc64
ARCH_FLAGS="$ARCH_FLAGS -DBYTEORDER=1234"
%endif
%ifarch alpha ia64
ARCH_FLAGS="$ARCH_FLAGS -DNOALLIGN=0"
%endif
sed "s/\$(ARCH_FLAGS)/$ARCH_FLAGS/" Makefile.def > Makefile
%patch1 -p1 -b .lfs
%patch2 -p1 -b .filenamelen
%patch3 -p1 -b .2GB
@ -38,23 +56,9 @@ which are compatible with the original UNIX compress utility.
%patch5 -p1 -b .bssUnderflow
%patch6 -p1 -b .endians
%patch7 -p1 -b .malloccheck
%patch8 -p1 -b .memmove
mv Makefile.def Makefile
%build
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
ENDIAN=4321
%ifarch sparc m68k armv4l ppc s390 s390x ppc64 sparc64
ENDIAN=1234
%endif
%ifarch alpha ia64
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DNOALLIGN=0"
%endif
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" ENDIAN="$ENDIAN"
make CFLAGS="%{optflags} %{?nc_endian} %{?nc_align}"
%install
rm -rf $RPM_BUILD_ROOT