rpms/grfcodec/devel fedora-build.patch, NONE, 1.1 grfcodec.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Iain Arnell iarnell at fedoraproject.org
Thu May 7 03:18:13 UTC 2009


Author: iarnell

Update of /cvs/pkgs/rpms/grfcodec/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9884/devel

Modified Files:
	.cvsignore sources 
Added Files:
	fedora-build.patch grfcodec.spec 
Log Message:
initial import

fedora-build.patch:

--- NEW FILE fedora-build.patch ---
diff -up grfcodec/getopt.c.fedora grfcodec/getopt.c
--- grfcodec/getopt.c.fedora	2006-09-06 00:22:55.000000000 +0200
+++ grfcodec/getopt.c	2009-05-03 17:10:43.000000000 +0200
@@ -157,7 +157,7 @@ static enum
 
 char *getenv ();
 
-static char *my_index (const char *string, int chr)
+static const char *my_index (const char *string, int chr)
 {
   while (*string)
     {
@@ -520,7 +520,7 @@ int _getopt_internal (int argc, char *co
 
   {
     char c = *nextchar++;
-    char *temp = my_index (optstring, c);
+    const char *temp = my_index (optstring, c);
 
     /* Increment `optind' when we start to process its last character.  */
     if (*nextchar == '\0')
diff -up /dev/null grfcodec/grfmrgc.S
--- /dev/null	2009-04-28 11:20:28.402126054 +0200
+++ grfcodec/grfmrgc.S	2009-05-03 17:10:43.000000000 +0200
@@ -0,0 +1,14 @@
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
+
+.section .data
+.global _grfmrg,_grfmrgsize,grfmrg,grfmrgsize
+
+	.align 4
+grfmrgsize:
+_grfmrgsize: .int _grfmrg_end-_grfmrg
+
+grfmrg:
+_grfmrg:	.incbin "grfmrgc.bin"
+_grfmrg_end:
diff -up grfcodec/Makefile.common.fedora grfcodec/Makefile.common
--- grfcodec/Makefile.common.fedora	2006-09-06 18:55:55.000000000 +0200
+++ grfcodec/Makefile.common	2009-05-03 17:10:43.000000000 +0200
@@ -7,14 +7,14 @@ FORCE:
 	$(_C)make -f $(MAKEFILE) $(_S) $(@:%_r=%)
 	$(_E) [STRIP/UPX] $(@:%_r=%)
 	$(_C)strip  $(@:%_r=%)$(REL_EXE)
-	$(_C)upx $(_Q) --best  $(@:%_r=%)$(REL_EXE)
+	$(_C)upx $(_Q) --best  $(@:%_r=%)$(REL_EXE) ||:
 
 release: grfcodec_r grfdiff_r grfmerge_r
 
 # grfmrg.bin (the binary code included in grfdiff) can be either BCC or GCC code
 grfmrg.bin:	grfmerge.exe
 	$(_E) [UPX] $@
-	$(_C)upx $(_Q) --best $< -o $@
+	$(_C)upx $(_Q) --best $< -o $@ ||:
 
 # make grfmerge.exe (as grfmrgc.bin) optimized for size instead of speed
 grfmrgc.bin:	grfmerge.os $(GRFMERGESRC:%.c=%.os)
@@ -23,7 +23,7 @@ grfmrgc.bin:	grfmerge.os $(GRFMERGESRC:%
 	$(_C)$(CC) -o $@ $(CFLAGS) -Os $^
 	$(_E) [STRIP/UPX] $@
 	$(_C)strip $@
-	$(_C)upx $(_Q) --best $@
+	$(_C)upx $(_Q) --best $@ ||:
 
 # making an assembly file which includes the above code; first for BCC
 grfmrg.ah:	grfmrg.bin 
@@ -36,9 +36,9 @@ grfmrg.obj:	grfmrg.asm grfmrg.ah
 	$(_C)tasm32 /dM32 /ml $< -c -o $@
 
 # and then for GCC
-grfmrg.o:	grfmrgc.asm grfmrgc.bin
-	$(_E) [NASM] $@
-	$(_C)nasm -f $(NASMFORMAT) $< -o $@
+grfmrg.o:	grfmrgc.S grfmrgc.bin
+	$(_E) [AS] $@
+	$(_C)as $< -o $@
 
 ttdpal.h:	$(PAL_FILES) pal2c.pl
 	$(_E) [PERL] $@
@@ -49,15 +49,15 @@ ttdpal.h:	$(PAL_FILES) pal2c.pl
 readinfo.o: readinfo.cc
 	$(_E) [CPP] $@
 	$(BOOST_WARN)	
-	$(_C)$(CXX) -c -o $@ -MMD -MG -MF $@.d $(CXXFLAGS) $<
+	$(_C)$(CXX) -c -o $@ -MMD -MF $@.d $(CXXFLAGS) $<
 
 %.o : %.c
 	$(_E) [CC] $@
-	$(_C)$(CC) -c -o $@ -MMD -MG -MF $@.d $(CFLAGS) $<
+	$(_C)$(CC) -c -o $@ -MMD -MF $@.d $(CFLAGS) $<
 
 %.o : %.cc
 	$(_E) [CPP] $@
-	$(_C)$(CXX) -c -o $@ -MMD -MG -MF $@.d $(CXXFLAGS) $<
+	$(_C)$(CXX) -c -o $@ -MMD -MF $@.d $(CXXFLAGS) $<
 
 % : %.o
 	$(_E) [LD] $@
@@ -76,7 +76,7 @@ readinfo.o: readinfo.cc
 # same as above but optimized for size not speed
 %.os : %.c
 	$(_E) [CC] $@
-	$(_C)$(CC) -c -o $@ -MD -MG -MF $@.d $(CFLAGS) -Os $<
+	$(_C)$(CC) -c -o $@ -MD -MF $@.d $(CFLAGS) -Os $<
 
 % :: %.os
 	$(_E) [LD] $@
diff -up grfcodec/Makefile.fedora grfcodec/Makefile
--- grfcodec/Makefile.fedora	2009-05-03 17:12:30.000000000 +0200
+++ grfcodec/Makefile	2009-05-03 17:12:45.000000000 +0200
@@ -22,7 +22,7 @@ CXX = g++
 # use 386 instructions but optimize for pentium II/III
 #CFLAGS = -g -DWIN32 -O3 -I. $(BOOST_CMD) $(CFLAGAPP) -Wall
 #CFLAGS = -g -DGCC64 -O3 -I. $(BOOST_CMD) $(CFLAGAPP) -Wall
-CFLAGS = -g -DGCC32 -O3 -I. $(BOOST_CMD) $(CFLAGAPP) -Wall
+CFLAGS = -g -DGCC32 -I. $(BOOST_CMD) $(CFLAGAPP) -Wall
 CXXFLAGS = $(CFLAGS)
 #LDOPT = -g -Wl,--subsystem,console -luser32 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32
 #LDOPT = -Wl,--subsystem,console,-s
diff -up grfcodec/readinfo.cc.fedora grfcodec/readinfo.cc
--- grfcodec/readinfo.cc.fedora	2009-04-28 21:17:02.000000000 +0200
+++ grfcodec/readinfo.cc	2009-05-03 17:10:43.000000000 +0200
@@ -39,6 +39,7 @@ Version 7: Add backslash escapes
 #include<string>
 #include<sstream>
 #include<iomanip>
+#include<cstdio>
 
 using namespace std;
 


--- NEW FILE grfcodec.spec ---
Name:           grfcodec
Version:        0.9.11
Release:        0.2.r2111%{?dist}
Summary:        A suite of programs to modify Transport Tycoon Deluxe's GRF files
Group:          Development/Tools
License:        GPLv2+
URL:            http://www.ttdpatch.net/grfcodec/
# svn export -r2111 svn://svn.ttdpatch.net/misc/grfcodec
# tar -czf grfcodec-r2111.tar.gz grfcodec
Source0:        grfcodec-r2111.tar.gz
# use gas, not nasm; fix build problems with gcc4.4; ignore upx failures; don't
# pass -O3 to gcc
Patch0:         fedora-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  boost-devel
BuildRequires:  upx


%description
A suite of programs to modify Transport Tycoon Deluxe's GRF files.


%prep
%setup -q -n %{name}
%patch0 -p 1 -b .fedora

for f in *.txt; do
  iconv -f iso8859-1 -t utf-8 $f >$f.conv 
  touch -r $f $f.conv
  mv $f.conv $f
done


%build
V=1 CFLAGAPP="%{optflags}" make %{?_smp_mflags}


%install
rm -rf %{buildroot}
for file in grfcodec grfdiff grfmerge; do
  install -D -m 755 $file %{buildroot}%{_bindir}/$file
done


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc Changelog COPYING grfcodec.txt grftut.txt grf.txt todo.txt
%{_bindir}/*


%changelog
* Sun May 03 2009 Iain Arnell <iarnell at gmail.com> 0.9.11-0.2.r2111
- fix license tag (GPLv2+)
- don't pass -O3 to gcc
- doesn't BR subversion

* Sat May 02 2009 Iain Arnell <iarnell at gmail.com> 0.9.11-0.1.r2111
- initial release


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/grfcodec/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	6 May 2009 21:05:48 -0000	1.1
+++ .cvsignore	7 May 2009 03:17:43 -0000	1.2
@@ -0,0 +1 @@
+grfcodec-r2111.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/grfcodec/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	6 May 2009 21:05:48 -0000	1.1
+++ sources	7 May 2009 03:17:43 -0000	1.2
@@ -0,0 +1 @@
+16286f814fb0cbbb24ed0253a98c0ab0  grfcodec-r2111.tar.gz




More information about the scm-commits mailing list