shared.patch 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. diff -Nur compface-1.5.2-old/compface.c compface-1.5.2/compface.c
  2. --- compface-1.5.2-old/compface.c 2008-04-14 23:51:54.000000000 +0300
  3. +++ compface-1.5.2/compface.c 2008-04-14 23:52:03.000000000 +0300
  4. @@ -19,7 +19,7 @@
  5. #include "config.h"
  6. #endif
  7. -#include "compface_private.h"
  8. +#include "compface.h"
  9. int
  10. compface(fbuf)
  11. diff -Nur compface-1.5.2-old/compface.h compface-1.5.2/compface.h
  12. --- compface-1.5.2-old/compface.h 2008-04-14 23:51:54.000000000 +0300
  13. +++ compface-1.5.2/compface.h 2008-04-14 23:52:03.000000000 +0300
  14. @@ -143,7 +143,6 @@
  15. int AllWhite P((char *, int, int)) ;
  16. int BigPop P((Prob *)) ;
  17. int compface P((char *)) ;
  18. -int main P((int, char *[])) ;
  19. int ReadBuf P(()) ;
  20. int Same P((char *, int, int)) ;
  21. int uncompface P((char *)) ;
  22. diff -Nur compface-1.5.2-old/Makefile compface-1.5.2/Makefile
  23. --- compface-1.5.2-old/Makefile 1970-01-01 02:00:00.000000000 +0200
  24. +++ compface-1.5.2/Makefile 2008-04-14 23:52:03.000000000 +0300
  25. @@ -0,0 +1,120 @@
  26. +prefix = /usr/local
  27. +exec_prefix = ${prefix}
  28. +srcdir = .
  29. +BINDIR = ${exec_prefix}/bin
  30. +LIBDIR = ${exec_prefix}/lib
  31. +MANDIR = ${prefix}/man
  32. +INCLUDEDIR = ${prefix}/include
  33. +
  34. +
  35. +
  36. +RM = rm -f
  37. +LN_S = ln -s
  38. +RANLIB = ranlib
  39. +INSTALL = /usr/bin/install -c
  40. +INSTALL_PROGRAM = ${INSTALL}
  41. +INSTALL_DATA = ${INSTALL} -m 644
  42. +SHELL = /bin/sh
  43. +
  44. +NAME = compface
  45. +UNNAME = uncompface
  46. +EXEEXT =
  47. +NAMEEXE = $(NAME)$(EXEEXT)
  48. +UNNAMEEXE = $(UNNAME)$(EXEEXT)
  49. +EXECUTABLE = $(BINDIR)/$(NAMEEXE)
  50. +UNEXECUTABLE = $(BINDIR)/$(UNNAMEEXE)
  51. +LIBNAME = lib$(NAME).a
  52. +SOLIBNAME = lib$(NAME).so
  53. +LIBRARY = $(LIBDIR)/$(LIBNAME)
  54. +MAN1DIR = $(MANDIR)/man1
  55. +MAN3DIR = $(MANDIR)/man3
  56. +OBJECTS = arith.o file.o compress.o gen.o uncompface.o compface.o
  57. +SOURCES = compface.c uncompface.c arith.c file.c compress.c gen.c \
  58. + cmain.c uncmain.c version.c
  59. +INSTALLHEADERS = compface.h
  60. +HDRS = $(INSTALLHEADERS) data.h compface_private.h
  61. +OTHERS = README $(NAME).1 $(NAME).3 Makefile.in Makefile.Ashton \
  62. + configure configure.in install-sh mkinstalldirs ChangeLog
  63. +
  64. +DISTFILES = $(OTHERS) $(HDRS) $(SOURCES)
  65. +
  66. +CC = gcc
  67. +CFLAGS = -g -O2
  68. +#CFLAGS = -g
  69. +DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_FCNTL_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRERROR=1 -DHAVE_CONFIG_H
  70. +LDFLAGS =
  71. +LIBS =
  72. +
  73. +all: $(NAMEEXE) $(UNNAMEEXE)
  74. +
  75. +$(NAMEEXE) : cmain.o $(LIBNAME)
  76. + $(CC) $(LDFLAGS) -o $@ cmain.o -Lshared -lcompface
  77. +
  78. +$(UNNAMEEXE) : uncmain.o $(LIBNAME)
  79. + $(CC) $(LDFLAGS) -o $@ uncmain.o -Lshared -lcompface
  80. +
  81. +$(LIBNAME) : $(OBJECTS)
  82. + ar rc $(LIBNAME) $(OBJECTS)
  83. + -$(RANLIB) $(LIBNAME)
  84. +
  85. +lint :
  86. + lint -abchx $(SOURCES)
  87. +
  88. +clean :
  89. + -rm -f *.o *.a *.sh core a.out $(NAMEEXE) $(UNNAMEEXE)
  90. +
  91. +distclean: clean
  92. + -rm -rf *~
  93. + -rm -f config.log config.status config.cache Makefile
  94. +
  95. +dist: $(DISTFILES)
  96. + echo compface-`sed -e '/version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  97. + $(RM) -rf `cat .fname`
  98. + mkdir `cat .fname`
  99. + ln $(DISTFILES) `cat .fname`
  100. + tar chzf `cat .fname`.tar.gz `cat .fname`
  101. + $(RM) -rf `cat .fname` .fname
  102. +
  103. +install: $(NAMEEXE) $(UNNAMEEXE) $(LIBNAME)
  104. + $(INSTALL_PROGRAM) -d $(BINDIR) $(LIBDIR) $(MAN1DIR) $(MAN3DIR) $(INCLUDEDIR)
  105. + $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(EXECUTABLE)
  106. + -chmod 0755 $(EXECUTABLE)
  107. + -strip $(EXECUTABLE)
  108. + $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(UNEXECUTABLE)
  109. + -chmod 0755 $(UNEXECUTABLE)
  110. + -strip $(UNEXECUTABLE)
  111. + $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(MAN1DIR)/$(NAME).1
  112. + cd $(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1
  113. + $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(MAN3DIR)/$(NAME).3
  114. + cd $(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3
  115. + for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(INCLUDEDIR)/$${hdr}; done
  116. + $(INSTALL_DATA) $(srcdir)/$(LIBNAME) $(LIBRARY)
  117. +
  118. +shar :
  119. + shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
  120. + compress $(NAME).sh
  121. +
  122. +static: $(OBJECTS)
  123. + ar rc $(LIBNAME) $(OBJECTS)
  124. + -ranlib $(LIBNAME)
  125. +
  126. +shared: $(OBJECTS)
  127. + $(CC) -shared -Wl,-soname,$(SOLIBNAME).1 $(LDFLAGS) -o $(SOLIBNAME).1.0.0 $(OBJECTS)
  128. +
  129. +.c.o:
  130. + $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
  131. +
  132. +arith.o: arith.c compface.h data.h
  133. +cmain.o: cmain.c compface.h data.h
  134. +compface.o: compface.c compface.h data.h
  135. +compress.o: compress.c compface.h data.h
  136. +file.o: file.c compface.h data.h
  137. +gen.o: gen.c compface.h data.h
  138. +uncmain.o: uncmain.c compface.h data.h
  139. +uncompface.o: uncompface.c compface.h data.h
  140. +
  141. +.PHONY: clean mostlyclean distclean realclean dist all shared static
  142. +
  143. +# Prevent GNU make v3 from overflowing arg limit on SysV.
  144. +.NOEXPORT:
  145. +