diff --git a/SPECS-EXTENDED/discount/define_destructor.patch b/SPECS-EXTENDED/discount/define_destructor.patch new file mode 100644 index 00000000000..d507b020f68 --- /dev/null +++ b/SPECS-EXTENDED/discount/define_destructor.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/config.h.in b/cmake/config.h.in +index e08220d..653163b 100644 +--- a/cmake/config.h.in ++++ b/cmake/config.h.in +@@ -8,6 +8,7 @@ + #ifndef _CONFIG_D + #define _CONFIG_D 1 + ++#define DESTRUCTOR + /* + * `discount` feature macros - we want them all! + */ diff --git a/SPECS-EXTENDED/discount/discount-c99.patch b/SPECS-EXTENDED/discount/discount-c99.patch new file mode 100644 index 00000000000..4bd9a84093a --- /dev/null +++ b/SPECS-EXTENDED/discount/discount-c99.patch @@ -0,0 +1,156 @@ +This is already fixed upstream as of this commit: + +commit 7afa5c62427d63177201a0f7d9254dfc6e3fca3f +Author: David Seifert +Date: Thu Oct 27 19:23:22 2022 +0200 + + Make C99 clean + + * Clang 16 (and likely GCC 14) will enforce strict C99 semantics + and break old K&R C declarations and require correct C89 + function prototypes. + + Bug: https://bugs.gentoo.org/870952 + Clang: https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213/9 + +But the changes do not backport cleanly to the Fedora version. + +diff --git a/configure.inc b/configure.inc +index a5520da28316c8aa..3672a5602a1e2ccf 100755 +--- a/configure.inc ++++ b/configure.inc +@@ -898,7 +898,7 @@ EOF + # AC_C_VOLATILE checks to see if the compiler supports the volatile keyword + # + AC_C_VOLATILE () { +- echo 'f() { volatile char me=1; }' > ngc$$.c ++ echo 'void f() { volatile char me=1; }' > ngc$$.c + LOGN "checking for \"volatile\" keyword" + + if __MAKEDOTO ngc$$.c; then +@@ -955,7 +955,7 @@ AC_WHATIS() { + echo "#include <${x}>" + done + +- echo "main() { printf(\"${MACRO}=\\\"${__fmt}\\\"\\n\", ${MACRO}); }" ) > _ngc$$.c ++ echo "int main() { printf(\"${MACRO}=\\\"${__fmt}\\\"\\n\", ${MACRO}); }" ) > _ngc$$.c + + if $AC_CC $AC_CFLAGS -o _ngc$$ _ngc$$.c; then + ./_ngc$$ +@@ -1590,7 +1590,8 @@ AC_PROG_INSTALL () { + fi + + # see if we can strip binaries +- echo 'main() { puts("hello, sailor!"); }' > ngc$$.c ++ echo '#include ' > ngc$$.c ++ echo 'int main() { puts("hello, sailor!"); }' >> ngc$$.c + if $AC_CC -o ngc$$ ngc$$.c; then + if $PROG_INSTALL -s -m 444 ngc$$ inst$$; then + _strip="-s" +diff --git a/configure.sh b/configure.sh +index da9fa147fda1756a..90febd50bf58e212 100755 +--- a/configure.sh ++++ b/configure.sh +@@ -141,8 +141,8 @@ if AC_CHECK_HEADERS sys/stat.h && AC_CHECK_FUNCS stat; then + cat > ngc$$.c << EOF + #include + +-main(argc, argv) +-char **argv; ++int ++main(int argc, char **argv) + { + struct stat info; + +diff --git a/gethopt.c b/gethopt.c +index 4c6e4cedb17539a8..730b5b32b8b2d626 100644 +--- a/gethopt.c ++++ b/gethopt.c +@@ -47,6 +47,7 @@ struct h_context *ctx; + int + hopterr(ctx,val) + struct h_context *ctx; ++int val; + { + int old = ctx->opterr; + +@@ -246,8 +247,7 @@ struct h_opt opts[] = { + + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + struct h_opt *ret; + struct h_context ctx; +diff --git a/mkd2html.c b/mkd2html.c +index cbe2b7a3bdf26cf1..6801dac8c20f4bda 100644 +--- a/mkd2html.c ++++ b/mkd2html.c +@@ -85,8 +85,7 @@ extern char* mkd_h1_title(MMIOT *); + + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + char *h; + char *source = 0, *dest = 0; +diff --git a/theme.c b/theme.c +index 8cfeef35e1413f34..39703282eaf9acac 100644 +--- a/theme.c ++++ b/theme.c +@@ -527,8 +527,7 @@ struct h_opt opts[] = { + #define NROPTS (sizeof opts / sizeof opts[0]) + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + char *template = "page.theme"; + char *source = "stdin"; +diff --git a/tools/cols.c b/tools/cols.c +index df80a1b0841b9f84..c7c6f49c8c28f23b 100644 +--- a/tools/cols.c ++++ b/tools/cols.c +@@ -2,8 +2,7 @@ + #include + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + register int c; + int xp; +diff --git a/tools/echo.c b/tools/echo.c +index f13028e64810db92..069863e5cca9c4f2 100644 +--- a/tools/echo.c ++++ b/tools/echo.c +@@ -4,8 +4,7 @@ + + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + int nl = 1; + int i; +diff --git a/tools/pandoc_headers.c b/tools/pandoc_headers.c +index dcc8821b06bb02e9..affc286e2135ec13 100644 +--- a/tools/pandoc_headers.c ++++ b/tools/pandoc_headers.c +@@ -50,8 +50,7 @@ struct h_opt opts[] = { + #define NROPTS (sizeof opts / sizeof opts[0]) + + int +-main(argc, argv) +-char **argv; ++main(int argc, char **argv) + { + int show_author=0, show_title=0, show_date=0; + MMIOT *p; diff --git a/SPECS-EXTENDED/discount/discount.signatures.json b/SPECS-EXTENDED/discount/discount.signatures.json index 976661ea5d0..4d84d93a44a 100644 --- a/SPECS-EXTENDED/discount/discount.signatures.json +++ b/SPECS-EXTENDED/discount/discount.signatures.json @@ -1,5 +1,5 @@ { "Signatures": { - "discount-2.2.4.tar.bz2": "74fd1e3cc2b4eacf7325d3fd89df38b589db60d5dd0f4f14a0115f7da5e230a5" + "v2.2.7.tar.gz": "72c1325ddfc40871d6810f1e272cf2d45b361f26357eb38f170fd04d737bb9f2" } -} +} \ No newline at end of file diff --git a/SPECS-EXTENDED/discount/discount.spec b/SPECS-EXTENDED/discount/discount.spec index edfa0eec3ec..231e3595ad5 100644 --- a/SPECS-EXTENDED/discount/discount.spec +++ b/SPECS-EXTENDED/discount/discount.spec @@ -1,15 +1,24 @@ Vendor: Microsoft Corporation Distribution: Azure Linux +# FTBFS with GCC 14 -Werror=incompatible-pointer-types +# https://bugzilla.redhat.com/show_bug.cgi?id=2261063 +%global build_type_safety_c 2 + Name: discount -Version: 2.2.4 -Release: 5%{?dist} +Version: 2.2.7 +Release: 10%{?dist} Summary: A command-line utility for converting Markdown files into HTML License: BSD URL: http://www.pell.portland.or.us/~orc/Code/%{name} -Source0: %{url}/%{name}-%{version}.tar.bz2 +Source0: https://github.com/Orc/%{name}/archive/v%{version}.tar.gz Patch0: discount-dont-run-ldconfig.patch +Patch1: define_destructor.patch +Patch2: set_deps.patch +Patch3: discount-c99.patch BuildRequires: gcc +BuildRequires: make +BuildRequires: cmake Requires: libmarkdown%{?_isa} = %{version}-%{release} %description @@ -38,7 +47,10 @@ libmarkdown. %prep %setup -q -%patch 0 -p1 +%patch -P 0 -p1 +%patch -P 1 -p1 +%patch -P 2 -p1 +%patch -P 3 -p1 %build @@ -51,30 +63,29 @@ CFLAGS='%{optflags}' ./configure.sh \ --enable-all-features \ --with-fenced-code \ --pkg-config -make %{?_smp_mflags} +#make +%make_build %{?_smp_flags} %install -make install.everything DESTDIR=%{buildroot} +%make_install install.man install.samples DESTDIR=%{buildroot} install -D -m 644 libmarkdown.pc %{buildroot}%{_libdir}/pkgconfig/ cp -pav libmarkdown.pc %{buildroot}%{_libdir}/pkgconfig/ # Rename sample programs (names are too generic) and matching man1 pages mv %{buildroot}%{_bindir}/makepage %{buildroot}%{_bindir}/discount-makepage mv %{buildroot}%{_bindir}/mkd2html %{buildroot}%{_bindir}/discount-mkd2html mv %{buildroot}%{_bindir}/theme %{buildroot}%{_bindir}/discount-theme -mv %{buildroot}%{_mandir}/man1/makepage.1 \ - %{buildroot}%{_mandir}/man1/discount-makepage.1 -mv %{buildroot}%{_mandir}/man1/mkd2html.1 \ - %{buildroot}%{_mandir}/man1/discount-mkd2html.1 -mv %{buildroot}%{_mandir}/man1/theme.1 \ - %{buildroot}%{_mandir}/man1/discount-theme.1 - +mv %{buildroot}%{_mandir}/man1/makepage.1 %{buildroot}%{_mandir}/man1/discount-makepage.1 +mv %{buildroot}%{_mandir}/man1/mkd2html.1 %{buildroot}%{_mandir}/man1/discount-mkd2html.1 +mv %{buildroot}%{_mandir}/man1/theme.1 %{buildroot}%{_mandir}/man1/discount-theme.1 %ldconfig_scriptlets -n libmarkdown %check -make test +for x in tests/*.t; do + LD_LIBRARY_PATH=$(pwd) sh "${x}" || exit 1; +done %files @@ -82,10 +93,12 @@ make test %{_bindir}/discount-makepage %{_bindir}/discount-mkd2html %{_bindir}/discount-theme -%{_mandir}/man1/markdown.1* -%{_mandir}/man7/markdown.7* %{_mandir}/man1/discount-*.1* -%{_mandir}/man7/mkd-*.7* +%{_mandir}/man1/markdown.1.gz +%{_mandir}/man3/markdown.3.gz +%{_mandir}/man3/mkd* +%{_mandir}/man7/markdown.7.gz +%{_mandir}/man7/mkd-extensions.7.gz %files -n libmarkdown @@ -97,14 +110,53 @@ make test %{_libdir}/libmarkdown.so %{_libdir}/pkgconfig/libmarkdown.pc %{_includedir}/mkdio.h -%{_mandir}/man3/markdown.3* -%{_mandir}/man3/mkd_*.3* -%{_mandir}/man3/mkd-*.3* %changelog -* Fri Oct 15 2021 Pawel Winogrodzki - 2.2.4-5 -- Initial CBL-Mariner import from Fedora 32 (license: MIT). +* Wed Oct 24 2024 Sreenivasulu Malavathula - 2.2.7-10 +- Initial Azure Linux import from Fedora 41 (license: MIT) +- License verified + +* Wed Jul 17 2024 Fedora Release Engineering - 2.2.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 2.2.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2.2.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Nov 28 2023 Greg Hellings - 2.2.7-6 +- Use upstream manpage install command +- Rename man pages whose names are bad + +* Wed Jul 19 2023 Fedora Release Engineering - 2.2.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 2.2.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 25 2022 Florian Weimer - 2.2.7-3 +- Fix building in C99 mode + +* Thu Jul 21 2022 Fedora Release Engineering - 2.2.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Mar 18 2022 Greg Hellings - 2.2.7-1 +- Upstream version 2.2.7 +- Add two patches + +* Thu Jan 20 2022 Fedora Release Engineering - 2.2.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 2.2.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 2.2.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 2.2.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jan 28 2020 Fedora Release Engineering - 2.2.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/SPECS-EXTENDED/discount/set_deps.patch b/SPECS-EXTENDED/discount/set_deps.patch new file mode 100644 index 00000000000..610aa543ce1 --- /dev/null +++ b/SPECS-EXTENDED/discount/set_deps.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index 750d9b7..d41b22c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -139,7 +139,7 @@ test: $(PGMS) $(TESTFRAMEWORK) verify + + pandoc_headers.o: tools/pandoc_headers.c config.h + $(BUILD) -c -o pandoc_headers.o tools/pandoc_headers.c +-pandoc_headers: pandoc_headers.o ++pandoc_headers: pandoc_headers.o $(MKDLIB) + $(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown + + branch.o: tools/branch.c config.h diff --git a/cgmanifest.json b/cgmanifest.json index 80d7f38d2e3..7234ae0e81a 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -2638,8 +2638,8 @@ "type": "other", "other": { "name": "discount", - "version": "2.2.4", - "downloadUrl": "http://www.pell.portland.or.us/~orc/Code/discount/discount-2.2.4.tar.bz2" + "version": "2.2.7", + "downloadUrl": "https://github.com/Orc/discount/archive/v2.2.7.tar.gz" } } },