Compare commits

..

6 commits

Author SHA1 Message Date
Fedora Release Engineering
c3b7c8e376 dist-git conversion 2010-07-29 14:49:31 +00:00
Bill Nottingham
eeba1969a4 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:16:34 +00:00
James Antill
c183abdbf1 - Import fix for ustr-import, wrt. repl <=> replace 2007-08-08 23:39:40 +00:00
James Antill
1f7ee11c4a - Patches for minor GIT HEAD documentation fixes.
- Install mkdir_p and fgrep examples.
2007-08-06 01:56:47 +00:00
James Antill
a3dff5b421 - First upload to Fedora repos. 2007-08-04 19:07:09 +00:00
e5b3816f7a Initialize branch FC-6 for ustr 2007-08-04 18:13:13 +00:00
7 changed files with 109 additions and 233 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
ustr-1.0.4.tar.bz2
ustr-1.0.1.tar.gz

View file

@ -1,30 +0,0 @@
diff -rup ustr-1.0.4-orig/ustr-compiler.h ustr-1.0.4/ustr-compiler.h
--- ustr-1.0.4-orig/ustr-compiler.h 2008-02-15 15:12:28.000000000 -0500
+++ ustr-1.0.4/ustr-compiler.h 2008-06-13 15:25:18.000000000 -0400
@@ -113,17 +113,23 @@
#endif
#ifndef USTR_CONF_EI_PROTO /* external inline */
-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS
+# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \
+ ! USTR_CONF_COMPILE_USE_INLINE
# define USTR_CONF_EI_PROTO static USTR__INLINE
# else
# define USTR_CONF_EI_PROTO extern
# endif
#endif
#ifndef USTR_CONF_II_PROTO /* implementation of inline */
-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS
+# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \
+ ! USTR_CONF_COMPILE_USE_INLINE
# define USTR_CONF_II_PROTO static USTR__INLINE
# else
-# define USTR_CONF_II_PROTO extern inline
+# if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__)
+# define USTR_CONF_II_PROTO extern inline __attribute__ ((__gnu_inline__))
+# else
+# define USTR_CONF_II_PROTO extern inline
+# endif
# endif
#endif

42
html_doc_fixes.patch Normal file
View file

@ -0,0 +1,42 @@
--- Documentation/index.html 2007-08-04 01:21:02.000000000 -0400
+++ Documentation/index.html 2007-08-04 01:43:27.000000000 -0400
@@ -39,7 +39,7 @@
<body>
<h1>Micro String API - for C</h1>
-<h2> Download </h2>
+<h2> Download - Version 1.0.1 </h2>
<p> You can get the stable release of <A href="1.0.1">1.0.x here</A>, it still
doesn't have 100% documentation but it's pretty close. You can get the current
@@ -693,8 +693,8 @@
ustr_free(s2); <span class="comment">/* free'd one reference to the data pointed to by both s2 and s3 */</span>
-ustr_set_share(s2); <span class="comment">/* Make s2/s3 "shared" data,
- so it always has infinite references */</span>
+ustr_setf_share(s2); <span class="comment">/* Make s2/s3 "shared" data,
+ so it always has infinite references */</span>
if (ustr_shared(s2)) <span class="comment">/* This is TRUE */</span>
<span class="comment">/* whatever */</span> ;
@@ -718,8 +718,8 @@
hence the explicit first check */</span>
<span class="comment">/* error */</span> ;
-ustr_set_owner(s2); <span class="comment">/* Make s2 be "non-shared" and have a single owner */</span>
-ustr_set_owner(s1); <span class="comment">/* This fails, as you can't make a read-only string be "non-shared" */</span>
+ustr_setf_owner(s2); <span class="comment">/* Make s2 be "non-shared" and have a single owner */</span>
+ustr_setf_owner(s1); <span class="comment">/* This fails, as you can't make a read-only string be "non-shared" */</span>
ustr_sc_del(&amp;s2); <span class="comment">/* free'd s2 and set s2 = USTR("") */</span>
@@ -742,7 +742,7 @@
<address><a href="mailto:james-web@and.org">James Antill</a></address>
<!-- Created: Thu May 10 02:10:59 EDT 2007 -->
<!-- hhmts start -->
-Last modified: Sat Aug 4 01:21:02 EDT 2007
+Last modified: Sat Aug 4 01:43:27 EDT 2007
<!-- hhmts end -->
</body>
</html>

13
import_repl.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/ustr-import.in b/ustr-import.in
index cdc0ab0..54acb7d 100644
--- a/ustr-import.in
+++ b/ustr-import.in
@@ -255,7 +255,7 @@ if $pool; then
fi
if $repl; then
- copy repl
+ copy replace
fi
if $sc; then

12
inst_examples.patch Normal file
View file

@ -0,0 +1,12 @@
diff --git a/Makefile b/Makefile
index 53edefe..6232cf2 100644
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,7 @@ MAN_PAGES_3 = \
Documentation/ustr_const.3
EXAMPLES = examples/Makefile \
+ examples/fgrep.c \
examples/hello_world.c \
examples/hexdump.c \
examples/mkdir_p.c \

View file

@ -1 +1 @@
93147d9f0c9765d4cd0f04f7e44bdfce ustr-1.0.4.tar.bz2
5f855b3ebb8dd4da40f94952efa6c6d5 ustr-1.0.1.tar.gz

241
ustr.spec
View file

@ -1,43 +1,18 @@
%define show_all_cmds 1
%define broken_fed_dbg_opts 0
%define multilib_inst 1
%if %{show_all_cmds}
%define policy_cflags_hide HIDE=
%else
%define policy_cflags_hide %{nil}
%endif
%if %{broken_fed_dbg_opts}
# Variable name explains itself.
%define policy_cflags_broken DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=
%else
%define policy_cflags_broken %{nil}
%endif
%define policy_cflags %{policy_cflags_hide} %{policy_cflags_broken}
%if %{multilib_inst}
%define ustr_make_install install-multilib-linux
%else
%define ustr_make_install install
%endif
Name: ustr
Version: 1.0.4
Release: 44%{?dist}
Version: 1.0.1
Release: 5%{?dist}
Summary: String library, very low memory overhead, simple to import
# Automatically converted from old format: MIT or LGPLv2+ or BSD - review is highly recommended.
License: LicenseRef-Callaway-MIT OR LicenseRef-Callaway-LGPLv2+ OR LicenseRef-Callaway-BSD
Group: System Environment/Libraries
License: MIT or LGPLv2+ or BSD
URL: http://www.and.org/ustr/
Source0: http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.bz2
Patch0: c99-inline.patch
Source0: http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.gz
Patch0: inst_examples.patch
Patch1: html_doc_fixes.patch
Patch2: import_repl.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# BuildRequires: make gcc sed
BuildRequires: make
BuildRequires: gcc
%description
Micro string library, very low overhead from plain strdup() (Ave. 44% for
0-20B strings). Very easy to use in existing C code. At it's simplest you can
@ -46,6 +21,7 @@ just include a single header file into your .c and start using it.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
# This isn't required, but Fedora policy makes it so
Requires: pkgconfig >= 0.14
Requires: %{name} = %{version}-%{release}
@ -58,6 +34,7 @@ the code in your projects ... you don't have to link to the shared lib.
%package static
Summary: Static development files for %{name}
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
@ -65,6 +42,7 @@ Requires: %{name}-devel = %{version}-%{release}
%package debug
Summary: Development files for %{name}, with debugging options turned on
Group: Development/Libraries
# This isn't required, but Fedora policy makes it so
Requires: pkgconfig >= 0.14
Requires: %{name}-devel = %{version}-%{release}
@ -76,6 +54,7 @@ library.
%package debug-static
Summary: Static development files for %{name}, with debugging options turned on
Group: Development/Libraries
Requires: %{name}-debug = %{version}-%{release}
%description debug-static
@ -83,49 +62,55 @@ Requires: %{name}-debug = %{version}-%{release}
%prep
%setup -q
%patch -P0 -p1
%patch0 -p1
%patch1 -p0
%patch2 -p1
%build
make %{?_smp_mflags} all-shared CFLAGS="${CFLAGS:-%optflags} -fgnu89-inline" \
LDFLAGS="$RPM_LD_FLAGS" %{policy_cflags}
# Last variable name explains itself.
make %{?_smp_mflags} all-shared CFLAGS="${CFLAGS:-%optflags}" HIDE= \
DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=
%check
%if %{?chk}%{!?chk:1}
make %{?_smp_mflags} check CFLAGS="${CFLAGS:-%optflags} -fgnu89-inline"
LDFLAGS="$RPM_LD_FLAGS" %{policy_cflags}
make check HIDE=
%endif
%install
rm -rf $RPM_BUILD_ROOT
make $@ %{ustr_make_install} prefix=%{_prefix} \
make $@ install prefix=%{_prefix} \
bindir=%{_bindir} mandir=%{_mandir} \
datadir=%{_datadir} libdir=%{_libdir} \
includedir=%{_includedir} libexecdir=%{_libexecdir} \
DOCSHRDIR=%{_datadir}/doc/ustr-devel \
includedir=%{_includedir} \
DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true HIDE=
%ldconfig_scriptlets
%clean
rm -rf $RPM_BUILD_ROOT
%ldconfig_scriptlets debug
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post debug -p /sbin/ldconfig
%postun debug -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/libustr-1.0.so.*
%{!?_licensedir:%global license %%doc}
%license LICENSE*
%doc ChangeLog README NEWS
%doc ChangeLog LICENSE* README NEWS
%files devel
%defattr(-,root,root,-)
%{_datadir}/ustr-%{version}
%{_bindir}/ustr-import
%if %{multilib_inst}
%{_libexecdir}/ustr-%{version}
%endif
%{_includedir}/ustr.h
%{_includedir}/ustr-*.h
%exclude %{_includedir}/ustr*debug*.h
%exclude %{_includedir}/ustr*debug.h
%{_libdir}/pkgconfig/ustr.pc
%{_libdir}/libustr.so
%{_datadir}/doc/ustr-devel
%{_datadir}/doc/ustr-devel-%{version}
%{_mandir}/man1/*
%{_mandir}/man3/*
@ -133,9 +118,11 @@ make $@ %{ustr_make_install} prefix=%{_prefix} \
%{_libdir}/libustr.a
%files debug
%defattr(-,root,root,-)
%{_libdir}/libustr-debug-1.0.so.*
%{_libdir}/libustr-debug.so
%{_includedir}/ustr*debug*.h
%{_includedir}/ustr-debug.h
%{_includedir}/ustr-conf-debug.h
%{_libdir}/pkgconfig/ustr-debug.pc
%files debug-static
@ -143,154 +130,6 @@ make $@ %{ustr_make_install} prefix=%{_prefix} \
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 1.0.4-40
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 1.0.4-26
- Use LDFLAGS from redhat-rpm-config
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 30 2015 James Antill <james@fedoraproject.org> - 1.0.4-20
- Move doc/ustr-devel-<version> to doc/ustr-devel. BZ 993940.
- Use -fgnu89-inline workaround for gcc5.
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Aug 6 2014 Tom Callaway <spot@fedoraproject.org> - 1.0.4-17
- fix license handling
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 1.0.4-10
- Use bzipped upstream tarball.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Jun 13 2008 James Antill <james@fedoraproject.org> - 1.0.4-7
- Fix c99 inline problems, newer GCC
* Sun Mar 9 2008 James Antill <james@fedoraproject.org> - 1.0.4-6
- Fix dir. ownership bug.
- Resolves: rhbz#436711
* Wed Mar 5 2008 James Antill <james@fedoraproject.org> - 1.0.4-5
- New new upstream: 1.0.4
* Thu Feb 21 2008 Dennis Gilmore <dennis@ausil.us> - 1.0.3-5
- set broken_fed_dbg_opts to 0 its the recomended option upstream
- this works around sparc GCC problems
- add smpflags and cflags to make check
* Wed Feb 13 2008 James Antill <james@fedoraproject.org> - 1.0.3-4
- Preserve timestamps for shared multilib. files.
- Relates: bug#343351
* Sun Feb 10 2008 James Antill <james@fedoraproject.org> - 1.0.3-3
- Add upstream multilib patch for ustr-import
- Resolves: bug#343351
* Mon Jan 14 2008 James Antill <james@fedoraproject.org> - 1.0.3-2
- Build new upstream in Fedora
* Tue Oct 30 2007 James Antill <james@and.org> - 1.0.2-2
- Build new upstream in Fedora
* Mon Oct 29 2007 James Antill <james@and.org> - 1.0.2-1
- New release
* Tue Aug 28 2007 James Antill <jantill@redhat.com> - 1.0.1-6
- Add options for fedora policy brokeness, so it's easy to undo.
- Rebuild for buildid.
* Wed Aug 8 2007 James Antill <james@and.org> - 1.0.1-5
- Import fix for ustr-import, wrt. repl <=> replace