forked from pool/ncurses
Make pkg-config files .pc consistent
OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=425
This commit is contained in:
parent
b263cbbb56
commit
a155c6ba27
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 15 11:43:33 UTC 2019 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Make pkg-config files .pc consistent
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 13 07:51:13 UTC 2019 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
39
ncurses.spec
39
ncurses.spec
@ -598,7 +598,14 @@ mv tack-* tack
|
||||
mkdir pc
|
||||
PKG_CONFIG_PATH=$PWD/pc:$(pkg-config --variable pc_path pkg-config)
|
||||
export PKG_CONFIG_PATH
|
||||
mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
|
||||
rm -vf %{root}%{_libdir}/pkgconfig/tic.pc
|
||||
rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc
|
||||
mv -vf %{root}%{_libdir}/pkgconfig/*.pc pc/
|
||||
sed -ri 's@^(Requires.private: ).*@\1panelw, menuw, formw, ncursesw, tinfo@' \
|
||||
pc/ncurses++w.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1ncursesw, tinfo@' pc/{form,menu,panel}w.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -lncursesw -ltinfo -ldl@' pc/{form,menu,panel}w.pc
|
||||
|
||||
sh %{S:6} --cflags "$(pkg-config --cflags ncursesw)" --libs "$(pkg-config --libs ncursesw)" \
|
||||
%{root}%{_bindir}/ncursesw6-config
|
||||
#
|
||||
@ -681,15 +688,17 @@ mv tack-* tack
|
||||
test -e "$pc" || break
|
||||
base=${pc%%.pc}
|
||||
base=${base##*/}
|
||||
case "$base" in
|
||||
tic) sed -ri 's@^(Requires.private: ).*@\1tinfo5@' "$pc" ;;
|
||||
*) sed -ri 's@^(Requires.private: ).*@\1ncurses5@' "$pc"
|
||||
esac
|
||||
sed -ri 's@^(includedir=).*@\1%{_incdir}/ncurses5/ncurses@' "$pc"
|
||||
sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
|
||||
sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
|
||||
mv -f $pc pc/${base}5.pc
|
||||
done
|
||||
sed -ri 's@^(Requires.private: ).*@\1panel5, menu5, form5, ncurses5, tinfo5@' \
|
||||
pc/ncurses++5.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1ncurses5, tinfo5@' pc/{form,menu,panel}5.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -lncurses -ltinfo -ldl@' pc/{form,menu,panel}5.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1tinfo5@' pc/tic5.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -ltinfo@' pc/tic5.pc
|
||||
|
||||
sh %{S:6} --cflags "$(pkg-config --cflags ncurses5)" --libs "$(pkg-config --libs ncurses5)" \
|
||||
%{root}%{_bindir}/ncurses5-config
|
||||
|
||||
@ -739,6 +748,13 @@ mv tack-* tack
|
||||
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
|
||||
popd
|
||||
mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
|
||||
sed -ri 's@^(Requires.private: ).*@\1panel, menu, form, ncurses, tinfo@' \
|
||||
pc/ncurses++.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1ncurses, tinfo@' pc/{form,menu,panel}.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -lncurses -ltinfo -ldl@' pc/{form,menu,panel}.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1tinfo@' pc/tic.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -ltinfo@' pc/tic.pc
|
||||
|
||||
sh %{S:6} --cflags "$(pkg-config --cflags ncurses)" --libs "$(pkg-config --libs ncurses)" \
|
||||
%{root}%{_bindir}/ncurses6-config
|
||||
#
|
||||
@ -810,20 +826,23 @@ mv tack-* tack
|
||||
pushd man
|
||||
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1
|
||||
popd
|
||||
rm -vf %{root}%{_libdir}/pkgconfig/tic.pc
|
||||
rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc
|
||||
for pc in %{root}%{_libdir}/pkgconfig/*.pc
|
||||
do
|
||||
test -e "$pc" || break
|
||||
base=${pc%%.pc}
|
||||
base=${base##*/}
|
||||
case "$base" in
|
||||
tic) sed -ri 's@^(Requires.private: ).*@\1tinfo5@' "$pc" ;;
|
||||
*) sed -ri 's@^(Requires.private: ).*@\1ncurses5@' "$pc"
|
||||
esac
|
||||
sed -ri 's@^(includedir=).*@\1%{_incdir}/ncurses5/ncursesw@' "$pc"
|
||||
sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
|
||||
sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
|
||||
mv -f $pc pc/${base}5.pc
|
||||
done
|
||||
sed -ri 's@^(Requires.private: ).*@\1panelw5, menuw5, formw5, ncursesw5, tinfo5@' \
|
||||
pc/ncurses++w5.pc
|
||||
sed -ri 's@^(Requires.private: ).*@\1ncursesw5, tinfo5@' pc/{form,menu,panel}w5.pc
|
||||
sed -ri 's@^(Libs.private: .*)@\1 -lncursesw -ltinfo -ldl@' pc/{form,menu,panel}w5.pc
|
||||
|
||||
sh %{S:6} --cflags "$(pkg-config --cflags ncursesw5)" --libs "$(pkg-config --libs ncursesw5)" \
|
||||
%{root}%{_bindir}/ncursesw5-config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user