updated the pkgs/qse.spec.in to produce the nowidechar package

This commit is contained in:
hyung-hwan 2022-07-12 21:45:09 +00:00
parent fa39343d6c
commit 0e4da531ea
2 changed files with 47 additions and 3 deletions

View File

@ -183,7 +183,7 @@ public:
// allocation. all other functions except the copy/move constructors, some // allocation. all other functions except the copy/move constructors, some
// assignment operators, the destructor and the truncation() function are // assignment operators, the destructor and the truncation() function are
// not aware of this special condition. if you call other functions without // not aware of this special condition. if you call other functions without
// truncate(), your program will end with a crash. // truncate(), your program will end in a crash.
// //
// String x(0); // String x(0);
// try { x.truncate(10); } catch (...) { return -1; } // try { x.truncate(10); } catch (...) { return -1; }

View File

@ -1,9 +1,12 @@
%define _prefix /usr %define _prefix /usr
%define _sysconfdir /etc %define _sysconfdir /etc
%define _nowidechar_prefix /opt/qse-nowidechar
%define _nowidechar_libdir %{_nowidechar_prefix}/%{_lib}
Summary: QSE Library Summary: QSE Library
Name: @PACKAGE_NAME@ Name: @PACKAGE_NAME@
Version: 0.8.5 Version: @PACKAGE_VERSION@
Release: 1%{?dist} Release: 1%{?dist}
License: Simplified BSD License License: Simplified BSD License
Vendor: Chung, Hyung-Hwan Vendor: Chung, Hyung-Hwan
@ -27,6 +30,15 @@ Requires: @PACKAGE_NAME@ = %{version}
%description devel %description devel
The header files and libraries for developing applications with QSE. The header files and libraries for developing applications with QSE.
%package nowidechar
Summary: Development files for QSE Non-Widechar
Group: System Environment/Libraries
Requires: @PACKAGE_NAME@ = %{version}
%description nowidechar
The header files and libraries for developing applications with QSE Non-Widechar.
The nowidecharchar version is retained for building legacy applications.
%prep %prep
%setup -q %setup -q
@ -34,7 +46,9 @@ The header files and libraries for developing applications with QSE.
RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')" RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')"
#CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" CXXFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-shared=no --enable-static=no --enable-wide-char=yes:2w --enable-syscall=no --enable-cxx=yes --enable-pthread_flags=yes #CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" CXXFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-shared=no --enable-static=no --enable-wide-char=yes:2w --enable-syscall=no --enable-cxx=yes --enable-pthread_flags=yes
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ./configure \ mkdir bld-wide
pushd bld-wide
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \ --sysconfdir=%{_sysconfdir} \
@ -48,11 +62,37 @@ CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ./configure \
--enable-cxx=yes \ --enable-cxx=yes \
--enable-pthread_flags=yes ##CC=gcc44 CXX=g++44 --enable-pthread_flags=yes ##CC=gcc44 CXX=g++44
make make
popd
mkdir bld-no-wide
pushd bld-no-wide
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" ../configure \
--prefix=%{_nowidechar_prefix} \
--libdir=%{_nowidechar_libdir} \
--enable-shared=no \
--enable-static=yes \
--enable-wide-char=no \
--enable-bundled-unicode=no \
--enable-xcmgrs=yes \
--enable-syscall=no \
--enable-debug=no \
--enable-cxx=yes \
--enable-pthread_flags=yes ##CC=gcc44 CXX=g++44
make
popd
%install %install
pushd bld-wide
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
popd
pushd bld-no-wide
make install DESTDIR=$RPM_BUILD_ROOT
popd
##rm -f $RPM_BUILD_ROOT%{_libdir}/*.la ##rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
rm -rf $RPM_BUILD_ROOT%{_nowidechar_libdir}/pkgconfig
%clean %clean
rm -rf "$RPM_BUILD_ROOT" rm -rf "$RPM_BUILD_ROOT"
@ -73,3 +113,7 @@ rm -rf "$RPM_BUILD_ROOT"
%{_includedir}/* %{_includedir}/*
%{_libdir}/*.a %{_libdir}/*.a
%{_libdir}/*.la %{_libdir}/*.la
%files nowidechar
%defattr(-,root,root)
%{_nowidechar_prefix}/*