guile30-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. # This specfile is almost identical with Mlichvars
  2. # specfile for guile 2.2, in ideal world, we would
  3. # just rebase guile 2.2 to guile 3.0 but we do not
  4. # live in ideal world and we need to maintain both
  5. # guile 2.2 and guile 3 in Fedora. Thus this note
  6. # is giving credit to Mlichvar for all the delicate
  7. # mechanisms in this package.
  8. # Guile produces ELF images that are just containers for guile and don't
  9. # include build-ids. https://wingolog.org/archives/2014/01/19/elf-in-guile
  10. %undefine _missing_build_ids_terminate_build
  11. Name: guile30
  12. Version: 3.0.8
  13. Release: 1%{?_dist_release}
  14. Summary: A GNU implementation of Scheme for application extensibility
  15. Group: programming
  16. Vendor: Project Vine
  17. Distribution: Vine Linux
  18. License: LGPLv3+ and MIT and Public Domain and GPL+ and GPLv3+
  19. Source: https://ftp.gnu.org/gnu/guile/guile-%{version}.tar.gz
  20. URL: https://www.gnu.org/software/guile/
  21. BuildRequires: libtool libtool-ltdl-devel pkgconfig(gmp) pkgconfig(readline)
  22. BuildRequires: gettext-devel libunistring-devel pkgconfig(libffi) pkgconfig(bdw-gc)
  23. BuildRequires: make gcc
  24. BuildRequires: autoconf
  25. BuildRequires: pkgconfig
  26. Requires: coreutils
  27. Provides: guile = %{version}-%{release}
  28. %global mver %(echo '%{version}' | cut -d. -f 1-2)
  29. %global majorver %(echo '%{mver}' | cut -d. -f 1)
  30. %global minorver %(echo '%{mver}' | cut -d. -f 2)
  31. %global alt_priority %(printf "%%d%%02d" "%{majorver}" "%{minorver}")
  32. # Guile ships a patched version of localcharset from gnulib
  33. # its version is v0.1-1157-gb03f418
  34. Provides: bundled(gnulib)
  35. # Out of memory test is not stable, so disable it.
  36. Patch1: guile-3.0.7-disable-oom-test.patch
  37. # add chdir call before chroot to make it more secure
  38. Patch2: guile-3.0.7-chroot.patch
  39. # replace deprecated autoconf macro
  40. Patch3: guile-3.0.7-configure.patch
  41. # Disable unstable stack overflow test
  42. Patch4: guile-3.0.7-disable-stackoverflow-test.patch
  43. %description
  44. GUILE (GNU's Ubiquitous Intelligent Language for Extension) is a library
  45. implementation of the Scheme programming language, written in C. GUILE
  46. provides a machine-independent execution platform that can be linked in
  47. as a library during the building of extensible programs.
  48. Install the guile package if you'd like to add extensibility to programs
  49. that you are developing.
  50. %package devel
  51. Summary: Libraries and header files for the GUILE extensibility library
  52. Group: programming
  53. Requires: guile30%{?_isa} = %{version}-%{release} pkgconfig(gmp) pkgconfig(bdw-gc)
  54. Requires: pkgconfig
  55. Provides: guile-devel = %{version}-%{release}
  56. %description devel
  57. The guile-devel package includes the libraries, header files, etc.,
  58. that you'll need to develop applications that are linked with the
  59. GUILE extensibility library.
  60. You need to install the guile-devel package if you want to develop
  61. applications that will be linked to GUILE. You'll also need to
  62. install the guile package.
  63. %debug_package
  64. %prep
  65. %autosetup -p1 -n guile-%version
  66. %build
  67. autoreconf -iv
  68. %configure --disable-static --disable-error-on-warning --program-suffix=%{mver}
  69. %make_build
  70. %install
  71. %make_install
  72. mkdir -p %{buildroot}%{_datadir}/guile/site/%{mver}
  73. rm -f %{buildroot}%{_libdir}/libguile*.la
  74. rm -f %{buildroot}%{_infodir}/dir
  75. for i in $(seq 1 11); do
  76. mv %{buildroot}%{_infodir}/guile{,-%{mver}}.info-$i
  77. sed -i -e 's/guile\.info/guile-%{mver}.info/' %{buildroot}%{_infodir}/guile-%{mver}.info-$i
  78. sed -i -e 's/\* Guile Reference: (guile)/* Guile %{mver} Reference: (guile-%{mver})/' %{buildroot}%{_infodir}/guile-%{mver}.info-$i
  79. done
  80. mv %{buildroot}%{_infodir}/guile{,-%{mver}}.info
  81. sed -i -e 's/guile\.info/guile-%{mver}.info/' %{buildroot}%{_infodir}/guile-%{mver}.info
  82. sed -i -e 's/\* Guile Reference: (guile)/* Guile %{mver} Reference: (guile-%{mver})/' %{buildroot}%{_infodir}/guile-%{mver}.info
  83. mv %{buildroot}%{_infodir}/r5rs{,-%{mver}}.info
  84. mv %{buildroot}%{_datadir}/aclocal/guile{,-%{mver}}.m4
  85. # Our gdb doesn't support guile yet
  86. rm -f %{buildroot}%{_libdir}/libguile*gdb.scm
  87. for i in %{buildroot}%{_infodir}/goops.info; do
  88. iconv -f iso8859-1 -t utf-8 < $i > $i.utf8 && mv -f ${i}{.utf8,}
  89. done
  90. touch %{buildroot}%{_datadir}/guile/site/%{mver}/slibcat
  91. # Adjust mtimes so they are all identical on all architectures.
  92. # When guile.x86_64 and guile.i686 are installed at the same time on an x86_64 system,
  93. # the *.scm files' timestamps change, as they normally reside in /usr/share/guile/.
  94. # Their corresponding compiled *.go file go to /usr/lib64/, or /usr/lib/, depending on the arch.
  95. # The mismatch in timestamps between *.scm and *.go files makes guile to compile itself
  96. # everytime it's run. The following code adjusts the files so that their timestamps are the same
  97. # for every file, but unique between builds.
  98. # See https://bugzilla.redhat.com/show_bug.cgi?id=1208760.
  99. find %{buildroot}%{_datadir} -name '*.scm' -exec touch -r "%{_specdir}/guile3.spec" '{}' \;
  100. find %{buildroot}%{_libdir} -name '*.go' -exec touch -r "%{_specdir}/guile3.spec" '{}' \;
  101. # Remove Libtool archive
  102. rm %{buildroot}%{_libdir}/guile/%{mver}/extensions/guile-readline.la
  103. %check
  104. make %{?_smp_mflags} check || true
  105. %post
  106. if [ $1 -eq 1 ]; then
  107. %{_sbindir}/update-alternatives \
  108. --install \
  109. %{_bindir}/guile \
  110. guile \
  111. %{_bindir}/guile%{?mver} \
  112. %{alt_priority} \
  113. --slave \
  114. %{_bindir}/guild \
  115. guild \
  116. %{_bindir}/guild%{?mver} \
  117. --slave \
  118. %{_bindir}/guile-tools \
  119. guile-tools \
  120. %{_bindir}/guile-tools%{?mver} \
  121. --slave \
  122. %{_mandir}/man1/guile.1.gz \
  123. guile.1 \
  124. %{_mandir}/man1/guile%{?mver}.1.gz
  125. fi
  126. %preun
  127. if [ "$1" = 0 ]; then
  128. %{_sbindir}/update-alternatives \
  129. --remove \
  130. guile \
  131. %{_bindir}/guile%{?mver}
  132. fi
  133. :
  134. %post devel
  135. if [ $1 -eq 1 -o ! -e %{_libdir}/pkgconfig/guile.pc ]; then
  136. %{_sbindir}/update-alternatives \
  137. --install \
  138. %{_bindir}/guile-config \
  139. guile-config \
  140. %{_bindir}/guile-config%{?mver} \
  141. %{alt_priority} \
  142. --slave \
  143. %{_bindir}/guile-snarf \
  144. guile-snarf \
  145. %{_bindir}/guile-snarf%{?mver} \
  146. --slave \
  147. %{_libdir}/pkgconfig/guile.pc \
  148. guile.pc \
  149. %{_libdir}/pkgconfig/guile-%{?mver}.pc
  150. fi
  151. %preun devel
  152. if [ "$1" = 0 ]; then
  153. %{_sbindir}/update-alternatives \
  154. --remove \
  155. guile-config \
  156. %{_bindir}/guile-config%{?mver}
  157. fi
  158. %triggerin -- slib >= 3b4-1
  159. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  160. export SCHEME_LIBRARY_PATH=%{_datadir}/slib/
  161. # Build SLIB catalog
  162. %{_bindir}/guile%{mver} --fresh-auto-compile --no-auto-compile -c \
  163. "(use-modules (ice-9 slib)) (require 'new-catalog)" &> /dev/null || \
  164. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  165. :
  166. %triggerun -- slib >= 3b4-1
  167. if [ "$2" = 0 ]; then
  168. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  169. fi
  170. %files
  171. %license COPYING COPYING.LESSER LICENSE
  172. %doc AUTHORS HACKING README THANKS
  173. %{_bindir}/guild%{mver}
  174. %{_bindir}/guile%{mver}
  175. %{_bindir}/guile-tools%{mver}
  176. %{_libdir}/libguile-%{mver}.so.1*
  177. %{_libdir}/guile
  178. %dir %{_datadir}/guile
  179. %dir %{_datadir}/guile/site
  180. %dir %{_datadir}/guile/%{mver}
  181. %dir %{_datadir}/guile/site/%{mver}
  182. %{_datadir}/guile/%{mver}/ice-9
  183. %{_datadir}/guile/%{mver}/language
  184. %{_datadir}/guile/%{mver}/oop
  185. %{_datadir}/guile/%{mver}/rnrs
  186. %{_datadir}/guile/%{mver}/scripts
  187. %{_datadir}/guile/%{mver}/srfi
  188. %{_datadir}/guile/%{mver}/sxml
  189. %{_datadir}/guile/%{mver}/system
  190. %{_datadir}/guile/%{mver}/texinfo
  191. %{_datadir}/guile/%{mver}/web
  192. %{_datadir}/guile/%{mver}/guile-procedures.txt
  193. %{_datadir}/guile/%{mver}/*.scm
  194. %{_datadir}/guile/%{mver}/scheme/*.scm
  195. %dir %{_datadir}/guile/%{mver}/scheme
  196. %ghost %{_datadir}/guile/site/%{mver}/slibcat
  197. %{_infodir}/*
  198. %{_mandir}/man1/guile%{?mver}*
  199. %files devel
  200. %{_bindir}/guile-config%{?mver}
  201. %{_bindir}/guile-snarf%{?mver}
  202. %{_datadir}/aclocal/*
  203. %{_libdir}/libguile-%{mver}.so
  204. %{_libdir}/pkgconfig/*.pc
  205. %{_includedir}/guile
  206. %changelog
  207. * Fri Nov 18 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.8-1
  208. - initial build for Vine Linux.
  209. - new upstream release.
  210. * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-6
  211. - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
  212. * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-5
  213. - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
  214. * Fri Jan 14 2022 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-4
  215. - Fix license field
  216. - Resolves: rhbz#2036203
  217. * Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.0.7-3
  218. - Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
  219. * Mon Aug 02 2021 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-2
  220. - Fix requires for devel package
  221. - Resolves: rhbz#1989011
  222. * Mon Jul 19 2021 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-1
  223. - Initial package