Skip to content

Commit 69a4c93

Browse files
authored
discount: Update Version from 2.2.4 -> 2.2.7 (#10844)
1 parent 3a6f8d4 commit 69a4c93

6 files changed

Lines changed: 259 additions & 26 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/cmake/config.h.in b/cmake/config.h.in
2+
index e08220d..653163b 100644
3+
--- a/cmake/config.h.in
4+
+++ b/cmake/config.h.in
5+
@@ -8,6 +8,7 @@
6+
#ifndef _CONFIG_D
7+
#define _CONFIG_D 1
8+
9+
+#define DESTRUCTOR
10+
/*
11+
* `discount` feature macros - we want them all!
12+
*/
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
This is already fixed upstream as of this commit:
2+
3+
commit 7afa5c62427d63177201a0f7d9254dfc6e3fca3f
4+
Author: David Seifert <soap@gentoo.org>
5+
Date: Thu Oct 27 19:23:22 2022 +0200
6+
7+
Make C99 clean
8+
9+
* Clang 16 (and likely GCC 14) will enforce strict C99 semantics
10+
and break old K&R C declarations and require correct C89
11+
function prototypes.
12+
13+
Bug: https://bugs.gentoo.org/870952
14+
Clang: https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213/9
15+
16+
But the changes do not backport cleanly to the Fedora version.
17+
18+
diff --git a/configure.inc b/configure.inc
19+
index a5520da28316c8aa..3672a5602a1e2ccf 100755
20+
--- a/configure.inc
21+
+++ b/configure.inc
22+
@@ -898,7 +898,7 @@ EOF
23+
# AC_C_VOLATILE checks to see if the compiler supports the volatile keyword
24+
#
25+
AC_C_VOLATILE () {
26+
- echo 'f() { volatile char me=1; }' > ngc$$.c
27+
+ echo 'void f() { volatile char me=1; }' > ngc$$.c
28+
LOGN "checking for \"volatile\" keyword"
29+
30+
if __MAKEDOTO ngc$$.c; then
31+
@@ -955,7 +955,7 @@ AC_WHATIS() {
32+
echo "#include <${x}>"
33+
done
34+
35+
- echo "main() { printf(\"${MACRO}=\\\"${__fmt}\\\"\\n\", ${MACRO}); }" ) > _ngc$$.c
36+
+ echo "int main() { printf(\"${MACRO}=\\\"${__fmt}\\\"\\n\", ${MACRO}); }" ) > _ngc$$.c
37+
38+
if $AC_CC $AC_CFLAGS -o _ngc$$ _ngc$$.c; then
39+
./_ngc$$
40+
@@ -1590,7 +1590,8 @@ AC_PROG_INSTALL () {
41+
fi
42+
43+
# see if we can strip binaries
44+
- echo 'main() { puts("hello, sailor!"); }' > ngc$$.c
45+
+ echo '#include <stdio.h>' > ngc$$.c
46+
+ echo 'int main() { puts("hello, sailor!"); }' >> ngc$$.c
47+
if $AC_CC -o ngc$$ ngc$$.c; then
48+
if $PROG_INSTALL -s -m 444 ngc$$ inst$$; then
49+
_strip="-s"
50+
diff --git a/configure.sh b/configure.sh
51+
index da9fa147fda1756a..90febd50bf58e212 100755
52+
--- a/configure.sh
53+
+++ b/configure.sh
54+
@@ -141,8 +141,8 @@ if AC_CHECK_HEADERS sys/stat.h && AC_CHECK_FUNCS stat; then
55+
cat > ngc$$.c << EOF
56+
#include <sys/stat.h>
57+
58+
-main(argc, argv)
59+
-char **argv;
60+
+int
61+
+main(int argc, char **argv)
62+
{
63+
struct stat info;
64+
65+
diff --git a/gethopt.c b/gethopt.c
66+
index 4c6e4cedb17539a8..730b5b32b8b2d626 100644
67+
--- a/gethopt.c
68+
+++ b/gethopt.c
69+
@@ -47,6 +47,7 @@ struct h_context *ctx;
70+
int
71+
hopterr(ctx,val)
72+
struct h_context *ctx;
73+
+int val;
74+
{
75+
int old = ctx->opterr;
76+
77+
@@ -246,8 +247,7 @@ struct h_opt opts[] = {
78+
79+
80+
int
81+
-main(argc, argv)
82+
-char **argv;
83+
+main(int argc, char **argv)
84+
{
85+
struct h_opt *ret;
86+
struct h_context ctx;
87+
diff --git a/mkd2html.c b/mkd2html.c
88+
index cbe2b7a3bdf26cf1..6801dac8c20f4bda 100644
89+
--- a/mkd2html.c
90+
+++ b/mkd2html.c
91+
@@ -85,8 +85,7 @@ extern char* mkd_h1_title(MMIOT *);
92+
93+
94+
int
95+
-main(argc, argv)
96+
-char **argv;
97+
+main(int argc, char **argv)
98+
{
99+
char *h;
100+
char *source = 0, *dest = 0;
101+
diff --git a/theme.c b/theme.c
102+
index 8cfeef35e1413f34..39703282eaf9acac 100644
103+
--- a/theme.c
104+
+++ b/theme.c
105+
@@ -527,8 +527,7 @@ struct h_opt opts[] = {
106+
#define NROPTS (sizeof opts / sizeof opts[0])
107+
108+
int
109+
-main(argc, argv)
110+
-char **argv;
111+
+main(int argc, char **argv)
112+
{
113+
char *template = "page.theme";
114+
char *source = "stdin";
115+
diff --git a/tools/cols.c b/tools/cols.c
116+
index df80a1b0841b9f84..c7c6f49c8c28f23b 100644
117+
--- a/tools/cols.c
118+
+++ b/tools/cols.c
119+
@@ -2,8 +2,7 @@
120+
#include <stdlib.h>
121+
122+
int
123+
-main(argc, argv)
124+
-char **argv;
125+
+main(int argc, char **argv)
126+
{
127+
register int c;
128+
int xp;
129+
diff --git a/tools/echo.c b/tools/echo.c
130+
index f13028e64810db92..069863e5cca9c4f2 100644
131+
--- a/tools/echo.c
132+
+++ b/tools/echo.c
133+
@@ -4,8 +4,7 @@
134+
135+
136+
int
137+
-main(argc, argv)
138+
-char **argv;
139+
+main(int argc, char **argv)
140+
{
141+
int nl = 1;
142+
int i;
143+
diff --git a/tools/pandoc_headers.c b/tools/pandoc_headers.c
144+
index dcc8821b06bb02e9..affc286e2135ec13 100644
145+
--- a/tools/pandoc_headers.c
146+
+++ b/tools/pandoc_headers.c
147+
@@ -50,8 +50,7 @@ struct h_opt opts[] = {
148+
#define NROPTS (sizeof opts / sizeof opts[0])
149+
150+
int
151+
-main(argc, argv)
152+
-char **argv;
153+
+main(int argc, char **argv)
154+
{
155+
int show_author=0, show_title=0, show_date=0;
156+
MMIOT *p;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"discount-2.2.4.tar.bz2": "74fd1e3cc2b4eacf7325d3fd89df38b589db60d5dd0f4f14a0115f7da5e230a5"
3+
"v2.2.7.tar.gz": "72c1325ddfc40871d6810f1e272cf2d45b361f26357eb38f170fd04d737bb9f2"
44
}
5-
}
5+
}

SPECS-EXTENDED/discount/discount.spec

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
Vendor: Microsoft Corporation
22
Distribution: Azure Linux
3+
# FTBFS with GCC 14 -Werror=incompatible-pointer-types
4+
# https://bugzilla.redhat.com/show_bug.cgi?id=2261063
5+
%global build_type_safety_c 2
6+
37
Name: discount
4-
Version: 2.2.4
5-
Release: 5%{?dist}
8+
Version: 2.2.7
9+
Release: 10%{?dist}
610
Summary: A command-line utility for converting Markdown files into HTML
711
License: BSD
812
URL: http://www.pell.portland.or.us/~orc/Code/%{name}
9-
Source0: %{url}/%{name}-%{version}.tar.bz2
13+
Source0: https://github.com/Orc/%{name}/archive/v%{version}.tar.gz
1014
Patch0: discount-dont-run-ldconfig.patch
15+
Patch1: define_destructor.patch
16+
Patch2: set_deps.patch
17+
Patch3: discount-c99.patch
1118

1219
BuildRequires: gcc
20+
BuildRequires: make
21+
BuildRequires: cmake
1322
Requires: libmarkdown%{?_isa} = %{version}-%{release}
1423

1524
%description
@@ -38,7 +47,10 @@ libmarkdown.
3847
%prep
3948
%setup -q
4049

41-
%patch 0 -p1
50+
%patch -P 0 -p1
51+
%patch -P 1 -p1
52+
%patch -P 2 -p1
53+
%patch -P 3 -p1
4254

4355

4456
%build
@@ -51,41 +63,42 @@ CFLAGS='%{optflags}' ./configure.sh \
5163
--enable-all-features \
5264
--with-fenced-code \
5365
--pkg-config
54-
make %{?_smp_mflags}
66+
#make
67+
%make_build %{?_smp_flags}
5568

5669

5770
%install
58-
make install.everything DESTDIR=%{buildroot}
71+
%make_install install.man install.samples DESTDIR=%{buildroot}
5972
install -D -m 644 libmarkdown.pc %{buildroot}%{_libdir}/pkgconfig/
6073
cp -pav libmarkdown.pc %{buildroot}%{_libdir}/pkgconfig/
6174
# Rename sample programs (names are too generic) and matching man1 pages
6275
mv %{buildroot}%{_bindir}/makepage %{buildroot}%{_bindir}/discount-makepage
6376
mv %{buildroot}%{_bindir}/mkd2html %{buildroot}%{_bindir}/discount-mkd2html
6477
mv %{buildroot}%{_bindir}/theme %{buildroot}%{_bindir}/discount-theme
65-
mv %{buildroot}%{_mandir}/man1/makepage.1 \
66-
%{buildroot}%{_mandir}/man1/discount-makepage.1
67-
mv %{buildroot}%{_mandir}/man1/mkd2html.1 \
68-
%{buildroot}%{_mandir}/man1/discount-mkd2html.1
69-
mv %{buildroot}%{_mandir}/man1/theme.1 \
70-
%{buildroot}%{_mandir}/man1/discount-theme.1
71-
78+
mv %{buildroot}%{_mandir}/man1/makepage.1 %{buildroot}%{_mandir}/man1/discount-makepage.1
79+
mv %{buildroot}%{_mandir}/man1/mkd2html.1 %{buildroot}%{_mandir}/man1/discount-mkd2html.1
80+
mv %{buildroot}%{_mandir}/man1/theme.1 %{buildroot}%{_mandir}/man1/discount-theme.1
7281

7382
%ldconfig_scriptlets -n libmarkdown
7483

7584

7685
%check
77-
make test
86+
for x in tests/*.t; do
87+
LD_LIBRARY_PATH=$(pwd) sh "${x}" || exit 1;
88+
done
7889

7990

8091
%files
8192
%{_bindir}/markdown
8293
%{_bindir}/discount-makepage
8394
%{_bindir}/discount-mkd2html
8495
%{_bindir}/discount-theme
85-
%{_mandir}/man1/markdown.1*
86-
%{_mandir}/man7/markdown.7*
8796
%{_mandir}/man1/discount-*.1*
88-
%{_mandir}/man7/mkd-*.7*
97+
%{_mandir}/man1/markdown.1.gz
98+
%{_mandir}/man3/markdown.3.gz
99+
%{_mandir}/man3/mkd*
100+
%{_mandir}/man7/markdown.7.gz
101+
%{_mandir}/man7/mkd-extensions.7.gz
89102

90103

91104
%files -n libmarkdown
@@ -97,14 +110,53 @@ make test
97110
%{_libdir}/libmarkdown.so
98111
%{_libdir}/pkgconfig/libmarkdown.pc
99112
%{_includedir}/mkdio.h
100-
%{_mandir}/man3/markdown.3*
101-
%{_mandir}/man3/mkd_*.3*
102-
%{_mandir}/man3/mkd-*.3*
103113

104114

105115
%changelog
106-
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 2.2.4-5
107-
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
116+
* Wed Oct 24 2024 Sreenivasulu Malavathula <v-smalavathu@microsoft.com> - 2.2.7-10
117+
- Initial Azure Linux import from Fedora 41 (license: MIT)
118+
- License verified
119+
120+
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-9
121+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
122+
123+
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-8
124+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
125+
126+
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-7
127+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
128+
129+
* Tue Nov 28 2023 Greg Hellings <greg.hellings@gmail.com> - 2.2.7-6
130+
- Use upstream manpage install command
131+
- Rename man pages whose names are bad
132+
133+
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-5
134+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
135+
136+
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-4
137+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
138+
139+
* Fri Nov 25 2022 Florian Weimer <fweimer@redhat.com> - 2.2.7-3
140+
- Fix building in C99 mode
141+
142+
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.7-2
143+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
144+
145+
* Fri Mar 18 2022 Greg Hellings - 2.2.7-1
146+
- Upstream version 2.2.7
147+
- Add two patches
148+
149+
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-8
150+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
151+
152+
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-7
153+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
154+
155+
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-6
156+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
157+
158+
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-5
159+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
108160

109161
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-4
110162
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/Makefile.in b/Makefile.in
2+
index 750d9b7..d41b22c 100644
3+
--- a/Makefile.in
4+
+++ b/Makefile.in
5+
@@ -139,7 +139,7 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
6+
7+
pandoc_headers.o: tools/pandoc_headers.c config.h
8+
$(BUILD) -c -o pandoc_headers.o tools/pandoc_headers.c
9+
-pandoc_headers: pandoc_headers.o
10+
+pandoc_headers: pandoc_headers.o $(MKDLIB)
11+
$(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown
12+
13+
branch.o: tools/branch.c config.h

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,8 +2648,8 @@
26482648
"type": "other",
26492649
"other": {
26502650
"name": "discount",
2651-
"version": "2.2.4",
2652-
"downloadUrl": "http://www.pell.portland.or.us/~orc/Code/discount/discount-2.2.4.tar.bz2"
2651+
"version": "2.2.7",
2652+
"downloadUrl": "https://github.com/Orc/discount/archive/v2.2.7.tar.gz"
26532653
}
26542654
}
26552655
},

0 commit comments

Comments
 (0)