guile30-vl.spec 8.9 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.9
  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. URL: https://www.gnu.org/software/guile/
  20. Source: https://ftp.gnu.org/gnu/guile/guile-%{version}.tar.gz
  21. # Out of memory test is not stable, so disable it.
  22. Patch1: guile-3.0.7-disable-oom-test.patch
  23. # add chdir call before chroot to make it more secure
  24. Patch2: guile-3.0.7-chroot.patch
  25. # replace deprecated autoconf macro
  26. #Patch3: guile-3.0.7-configure.patch
  27. # Disable unstable stack overflow test
  28. Patch4: guile-3.0.7-disable-stackoverflow-test.patch
  29. BuildRequires: libtool libtool-ltdl-devel pkgconfig(gmp) pkgconfig(readline)
  30. BuildRequires: gettext-devel libunistring-devel pkgconfig(libffi) pkgconfig(bdw-gc)
  31. BuildRequires: make gcc
  32. BuildRequires: autoconf
  33. BuildRequires: pkgconfig
  34. Requires: coreutils
  35. Provides: guile = %{version}-%{release}
  36. %global mver %(echo '%{version}' | cut -d. -f 1-2)
  37. %global majorver %(echo '%{mver}' | cut -d. -f 1)
  38. %global minorver %(echo '%{mver}' | cut -d. -f 2)
  39. %global alt_priority %(printf "%%d%%02d" "%{majorver}" "%{minorver}")
  40. # Guile ships a patched version of localcharset from gnulib
  41. # its version is v0.1-1157-gb03f418
  42. Provides: bundled(gnulib)
  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. export CFLAGS="%{optflags} -std=gnu17"
  68. autoreconf -fiv
  69. %configure --disable-static --disable-error-on-warning --program-suffix=%{mver}
  70. %make_build
  71. %install
  72. %make_install
  73. mkdir -p %{buildroot}%{_datadir}/guile/site/%{mver}
  74. rm -f %{buildroot}%{_libdir}/libguile*.la
  75. rm -f %{buildroot}%{_infodir}/dir
  76. for i in $(seq 1 11); do
  77. mv %{buildroot}%{_infodir}/guile{,-%{mver}}.info-$i
  78. sed -i -e 's/guile\.info/guile-%{mver}.info/' %{buildroot}%{_infodir}/guile-%{mver}.info-$i
  79. sed -i -e 's/\* Guile Reference: (guile)/* Guile %{mver} Reference: (guile-%{mver})/' %{buildroot}%{_infodir}/guile-%{mver}.info-$i
  80. done
  81. mv %{buildroot}%{_infodir}/guile{,-%{mver}}.info
  82. sed -i -e 's/guile\.info/guile-%{mver}.info/' %{buildroot}%{_infodir}/guile-%{mver}.info
  83. sed -i -e 's/\* Guile Reference: (guile)/* Guile %{mver} Reference: (guile-%{mver})/' %{buildroot}%{_infodir}/guile-%{mver}.info
  84. mv %{buildroot}%{_infodir}/r5rs{,-%{mver}}.info
  85. mv %{buildroot}%{_datadir}/aclocal/guile{,-%{mver}}.m4
  86. # Our gdb doesn't support guile yet
  87. rm -f %{buildroot}%{_libdir}/libguile*gdb.scm
  88. for i in %{buildroot}%{_infodir}/goops.info; do
  89. iconv -f iso8859-1 -t utf-8 < $i > $i.utf8 && mv -f ${i}{.utf8,}
  90. done
  91. touch %{buildroot}%{_datadir}/guile/site/%{mver}/slibcat
  92. # Adjust mtimes so they are all identical on all architectures.
  93. # When guile.x86_64 and guile.i686 are installed at the same time on an x86_64 system,
  94. # the *.scm files' timestamps change, as they normally reside in /usr/share/guile/.
  95. # Their corresponding compiled *.go file go to /usr/lib64/, or /usr/lib/, depending on the arch.
  96. # The mismatch in timestamps between *.scm and *.go files makes guile to compile itself
  97. # everytime it's run. The following code adjusts the files so that their timestamps are the same
  98. # for every file, but unique between builds.
  99. # See https://bugzilla.redhat.com/show_bug.cgi?id=1208760.
  100. find %{buildroot}%{_datadir} -name '*.scm' -exec touch -r "%{_specdir}/guile3.spec" '{}' \;
  101. find %{buildroot}%{_libdir} -name '*.go' -exec touch -r "%{_specdir}/guile3.spec" '{}' \;
  102. # Remove Libtool archive
  103. rm %{buildroot}%{_libdir}/guile/%{mver}/extensions/guile-readline.la
  104. %check
  105. make %{?_smp_mflags} check || true
  106. %post
  107. if [ $1 -eq 1 ]; then
  108. %{_sbindir}/update-alternatives \
  109. --install \
  110. %{_bindir}/guile \
  111. guile \
  112. %{_bindir}/guile%{?mver} \
  113. %{alt_priority} \
  114. --slave \
  115. %{_bindir}/guild \
  116. guild \
  117. %{_bindir}/guild%{?mver} \
  118. --slave \
  119. %{_bindir}/guile-tools \
  120. guile-tools \
  121. %{_bindir}/guile-tools%{?mver} \
  122. --slave \
  123. %{_mandir}/man1/guile.1.gz \
  124. guile.1 \
  125. %{_mandir}/man1/guile%{?mver}.1.gz
  126. fi
  127. %preun
  128. if [ "$1" = 0 ]; then
  129. %{_sbindir}/update-alternatives \
  130. --remove \
  131. guile \
  132. %{_bindir}/guile%{?mver}
  133. fi
  134. :
  135. %post devel
  136. if [ $1 -eq 1 -o ! -e %{_libdir}/pkgconfig/guile.pc ]; then
  137. %{_sbindir}/update-alternatives \
  138. --install \
  139. %{_bindir}/guile-config \
  140. guile-config \
  141. %{_bindir}/guile-config%{?mver} \
  142. %{alt_priority} \
  143. --slave \
  144. %{_bindir}/guile-snarf \
  145. guile-snarf \
  146. %{_bindir}/guile-snarf%{?mver} \
  147. --slave \
  148. %{_libdir}/pkgconfig/guile.pc \
  149. guile.pc \
  150. %{_libdir}/pkgconfig/guile-%{?mver}.pc
  151. fi
  152. %preun devel
  153. if [ "$1" = 0 ]; then
  154. %{_sbindir}/update-alternatives \
  155. --remove \
  156. guile-config \
  157. %{_bindir}/guile-config%{?mver}
  158. fi
  159. %triggerin -- slib >= 3b4-1
  160. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  161. export SCHEME_LIBRARY_PATH=%{_datadir}/slib/
  162. # Build SLIB catalog
  163. %{_bindir}/guile%{mver} --fresh-auto-compile --no-auto-compile -c \
  164. "(use-modules (ice-9 slib)) (require 'new-catalog)" &> /dev/null || \
  165. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  166. :
  167. %triggerun -- slib >= 3b4-1
  168. if [ "$2" = 0 ]; then
  169. rm -f %{_datadir}/guile/site/%{mver}/slibcat
  170. fi
  171. %files
  172. %license COPYING COPYING.LESSER LICENSE
  173. %doc AUTHORS HACKING README THANKS
  174. %{_bindir}/guild%{mver}
  175. %{_bindir}/guile%{mver}
  176. %{_bindir}/guile-tools%{mver}
  177. %{_libdir}/libguile-%{mver}.so.1*
  178. %{_libdir}/guile
  179. %dir %{_datadir}/guile
  180. %dir %{_datadir}/guile/site
  181. %dir %{_datadir}/guile/%{mver}
  182. %dir %{_datadir}/guile/site/%{mver}
  183. %{_datadir}/guile/%{mver}/ice-9
  184. %{_datadir}/guile/%{mver}/language
  185. %{_datadir}/guile/%{mver}/oop
  186. %{_datadir}/guile/%{mver}/rnrs
  187. %{_datadir}/guile/%{mver}/scripts
  188. %{_datadir}/guile/%{mver}/srfi
  189. %{_datadir}/guile/%{mver}/sxml
  190. %{_datadir}/guile/%{mver}/system
  191. %{_datadir}/guile/%{mver}/texinfo
  192. %{_datadir}/guile/%{mver}/web
  193. %{_datadir}/guile/%{mver}/guile-procedures.txt
  194. %{_datadir}/guile/%{mver}/*.scm
  195. %{_datadir}/guile/%{mver}/scheme/*.scm
  196. %dir %{_datadir}/guile/%{mver}/scheme
  197. %ghost %{_datadir}/guile/site/%{mver}/slibcat
  198. %{_infodir}/*
  199. %{_mandir}/man1/guile%{?mver}*
  200. %files devel
  201. %{_bindir}/guile-config%{?mver}
  202. %{_bindir}/guile-snarf%{?mver}
  203. %{_datadir}/aclocal/*
  204. %{_libdir}/libguile-%{mver}.so
  205. %{_libdir}/pkgconfig/*.pc
  206. %{_includedir}/guile
  207. %changelog
  208. * Fri Jun 13 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.9-1
  209. - new upstream release.
  210. * Fri Nov 18 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.8-1
  211. - initial build for Vine Linux.
  212. - new upstream release.
  213. * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-6
  214. - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
  215. * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-5
  216. - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
  217. * Fri Jan 14 2022 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-4
  218. - Fix license field
  219. - Resolves: rhbz#2036203
  220. * Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.0.7-3
  221. - Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
  222. * Mon Aug 02 2021 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-2
  223. - Fix requires for devel package
  224. - Resolves: rhbz#1989011
  225. * Mon Jul 19 2021 Tomas Korbar <tkorbar@redhat.com> - 3.0.7-1
  226. - Initial package