diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-20 20:49:46 -0500 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-23 20:18:47 -0500 |
commit | 12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch) | |
tree | 352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/gocr/patches.sh | |
parent | a2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (diff) |
Ported in the homebrew-marauder for a hacky update/import system.
TODO: Maybe add a license & fix up messy code.
Diffstat (limited to 'homebrew/gocr/patches.sh')
-rwxr-xr-x | homebrew/gocr/patches.sh | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/homebrew/gocr/patches.sh b/homebrew/gocr/patches.sh new file mode 100755 index 000000000..a8777cd0f --- /dev/null +++ b/homebrew/gocr/patches.sh @@ -0,0 +1,69 @@ +echo 'Creating brew-patch.diff' +cat << EOF >> brew-patch.diff +diff --git a/src/Makefile.in b/src/Makefile.in +index bf4181f..883fec2 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -10,7 +10,7 @@ PROGRAM = gocr$(EXEEXT) + PGMASCLIB = Pgm2asc + #LIBPGMASCLIB = lib$(PGMASCLIB).a + # ToDo: need a better pgm2asc.h for lib users +-#INCLUDEFILES = gocr.h ++INCLUDEFILES = pgm2asc.h output.h list.h unicode.h gocr.h pnm.h + # avoid german compiler messages + LANG=C + +@@ -39,8 +39,8 @@ LIBOBJS=pgm2asc.o \ + #VPATH = @srcdir@ + bindir = @bindir@ + # lib removed for simplification +-#libdir = @libdir@ +-#includedir = @includedir@ ++libdir = @libdir@ ++includedir = /include/gocr + + CC=@CC@ + # lib removed for simplification +@@ -89,7 +89,8 @@ $(PROGRAM): $(LIBOBJS) gocr.o + $(CC) -o $@ $(LDFLAGS) gocr.o $(LIBOBJS) $(LIBS) + # if test -r $(PROGRAM); then cp $@ ../bin; fi + +-libs: lib$(PGMASCLIB).a lib$(PGMASCLIB).@PACKAGE_VERSION@.so ++#libs: lib$(PGMASCLIB).a lib$(PGMASCLIB).@PACKAGE_VERSION@.so ++libs: lib$(PGMASCLIB).a + + #lib$(PGMASCLIB).@PACKAGE_VERSION@.so: $(LIBOBJS) + # $(CC) -fPIC -shared -Wl,-h$@ -o $@ $(LIBOBJS) +@@ -109,17 +110,17 @@ $(LIBOBJS): Makefile + # PHONY = don't look at file clean, -rm = start rm and ignore errors + .PHONY : clean proper install uninstall + install: all +- #$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) +- $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) ++ #$(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) $(PROGRAM) $(DESTDIR)$(bindir) + $(INSTALL) ../bin/gocr.tcl $(DESTDIR)$(bindir) # better X11/bin? + if test -f lib$(PGMASCLIB).a; then\ + $(INSTALL) lib$(PGMASCLIB).a $(DESTDIR)$(libdir);\ + $(INSTALL) lib$(PGMASCLIB).@PACKAGE_VERSION@.so $(DESTDIR)$(libdir);\ + $(INSTALL) lib$(PGMASCLIB).so $(DESTDIR)$(libdir);\ ++ $(INSTALL) $(INCLUDEFILES) $(DESTDIR)$(includedir);\ ++ $(INSTALL) ../include/config.h $(DESTDIR)$(includedir);\ + fi +- # ToDo: not sure that the link will be installed correctly +- #$(INSTALL) $(INCLUDEFILES) $(DESTDIR)$(includedir) + + # directories are not removed + uninstall: +@@ -129,7 +130,8 @@ uninstall: + -rm -f $(DESTDIR)$(libdir)/lib$(PGMASCLIB).@PACKAGE_VERSION@.so + -rm -f $(DESTDIR)$(libdir)/lib$(PGMASCLIB).so + # ToDo: set to old version.so ? +- #for X in $(INCLUDEFILES); do rm -f $(DESTDIR)$(includedir)/$$X; done ++ for X in $(INCLUDEFILES); do rm -f $(DESTDIR)$(includedir)/$$X; done ++ -rm -f $(DESTDIR)$(includedir)/config.h + + clean: + -rm -f *.o *~ +EOF |