Skip to content

Commit e4f3372

Browse files
committed
wine-tkg: upgrade build
1 parent 4aed201 commit e4f3372

File tree

3 files changed

+88
-77
lines changed

3 files changed

+88
-77
lines changed

builds/wine-tkg/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ USE_GE_PATCHES Default=YES
2323
PROTONIFY Default=NO
2424
LOCAL_PRESET_PROMPT Default=NO
2525
ALLOW_SERVER_RT_PRIO Default=YES
26+
DXVK_DXGI Default=YES
27+
WAYLAND Default=NO
2628

29+
NTSYNC Default=NO
2730
FASTSYNC Default=NO
2831
ESYNC Default=YES
2932
FSYNC Default=YES

builds/wine-tkg/symlink_usr_bin.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

builds/wine-tkg/wine-tkg.SlackBuild

Lines changed: 85 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2323
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424

25-
cd $(dirname $0) ; CWD=$(pwd)
25+
cd "$(dirname "$0")" ; CWD=$(pwd)
2626

2727
PRGNAM=wine-tkg
2828
VERSION=${VERSION:-git}
@@ -34,8 +34,11 @@ PKGTYPE=${PKGTYPE:-tgz}
3434
USE_STAGING=${USE_STAGING:-YES}
3535
USE_GE_PATCHES=${USE_GE_PATCHES:-YES}
3636
PROTONIFY=${PROTONIFY:-NO}
37+
DXVK_DXGI=${DXVK_DXGI:-YES}
38+
WAYLAND=${WAYLAND:-NO}
3739
LOCAL_PRESET_PROMPT=${LOCAL_PRESET_PROMPT:-NO}
3840
ALLOW_SERVER_RT_PRIO=${ALLOW_SERVER_RT_PRIO:-YES}
41+
NTSYNC=${NTSYNC:-NO}
3942
FASTSYNC=${FASTSYNC:-NO}
4043
ESYNC=${ESYNC:-YES}
4144
FSYNC=${FSYNC:-YES}
@@ -52,34 +55,40 @@ TMP=${TMP:-/tmp/SSb}
5255
PKG=${PKG:-$TMP/package-$PRGNAM-git}
5356
OUTPUT=${OUTPUT:-/tmp}
5457

55-
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
58+
if [ -n "${PRINT_PACKAGE_NAME}" ]; then
5659
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
5760
exit 0
5861
fi
5962

60-
if [ $ARCH != "x86_64" ]; then
63+
if [ "$ARCH" != "x86_64" ]; then
6164
echo "This script supports only x86_64 now, "
6265
exit 1
6366
fi
6467

65-
if [ ! -f /var/log/packages/glibc-[0-9]*_multilib-x86_64-*alien ]; then
66-
echo "Install glibc-[0-9]*_multilib-x86_64-*alien"
68+
WINETMP="$( mktemp -d "$TMP/wine-test-XXXXXX" )"
69+
echo "int main(void) {; return(0); }" > "$WINETMP/test.c"
70+
gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32TEST=${WINE32TEST:-yes}
71+
rm -rf "$WINETMP"
72+
if [[ $WINE32TEST = "yes" ]]; then
73+
echo "The multilib test passed."
74+
else
75+
echo "The multilib test has failed."
6776
exit 1
6877
fi
6978

7079
set -e
7180

72-
rm -rf $PKG
73-
mkdir -p $TMP $PKG $OUTPUT
74-
cd $TMP
81+
rm -rf "$PKG"
82+
mkdir -p "$TMP" "$PKG" "$OUTPUT"
83+
cd "$TMP"
7584
rm -rf wine-tkg-git
7685
rm -rf /tmp/wine-tkg
7786

7887
git clone https://github.com/Frogging-Family/wine-tkg-git
7988

8089
cd wine-tkg-git/wine-tkg-git
8190

82-
if [ $VERSION != "git" ]; then
91+
if [ "$VERSION" != "git" ]; then
8392
sed -i "s/_plain_version=\"\"/_plain_version=\"wine-$VERSION\"/" customization.cfg
8493
sed -i "s/_staging_version=\"\"/_staging_version=\"v$VERSION\"/" customization.cfg
8594
else
@@ -88,47 +97,63 @@ else
8897
fi
8998

9099

91-
if [ $USE_STAGING == "NO" ]; then
100+
if [ "$USE_STAGING" == "NO" ]; then
92101
sed -i '/_use_staging=/ s/"true"/"false"/' customization.cfg
93102
fi
94103

95-
if [ $USE_GE_PATCHES == "NO" ]; then
104+
if [ "$USE_GE_PATCHES" == "NO" ]; then
96105
sed -i '/_use_GE_patches=/ s/"true"/"false"/' customization.cfg
97106
fi
98107

99-
if [ $PROTONIFY == "YES" ]; then
108+
if [ "$PROTONIFY" == "YES" ]; then
100109
sed -i '/_protonify=/ s/"false"/"true"/' customization.cfg
101110
fi
102111

103-
if [ $LOCAL_PRESET_PROMPT == "NO" ]; then
112+
if [ "$LOCAL_PRESET_PROMPT" == "NO" ]; then
104113
sed -i '/_LOCAL_PRESET=/ s/""/"none"/' customization.cfg
105114
fi
106115

107-
if [ $ALLOW_SERVER_RT_PRIO == "YES" ]; then
116+
if [ "$ALLOW_SERVER_RT_PRIO" == "YES" ]; then
108117
sed -i '/_allow_server_rt_prio=/ s/"false"/"true"/' wine-tkg-profiles/advanced-customization.cfg
109118
fi
110119

111-
if [ $FASTSYNC == "YES" ]; then
120+
if [ "$DXVK_DXGI" == "NO" ]; then
121+
sed -i '/_dxvk_dxgi=/ s/"true"/"false"/' customization.cfg
122+
fi
123+
124+
if [ "$WAYLAND" == "YES" ]; then
125+
sed -i '/_wayland_driver=/ s/"false"/"true"/' customization.cfg
126+
fi
127+
128+
if [ "$NTSYNC" == "YES" ]; then
129+
sed -i '/_use_ntsync=/ s/"false"/"true"/' customization.cfg
130+
fi
131+
132+
if [ "$FASTSYNC" == "YES" ]; then
112133
sed -i '/_use_fastsync=/ s/"false"/"true"/' customization.cfg
113134
fi
114135

115-
if [ $ESYNC == "NO" ]; then
136+
if [ "$ESYNC" == "NO" ]; then
116137
sed -i '/_use_esync=/ s/"true"/"false"/' customization.cfg
117138
fi
118139

119-
if [ $FSYNC == "NO" ]; then
140+
if [ "$FSYNC" == "NO" ]; then
120141
sed -i '/_use_fsync=/ s/"true"/"false"/' customization.cfg
121142
fi
122143

123144
sed -i "s|_nomakepkg_prefix_path=\"\"|_nomakepkg_prefix_path=\"/usr\"|g" customization.cfg
145+
sed -i '/_nomakepkg_dependency_autoresolver=/ s/"true"/"false"/' customization.cfg
124146
sed -i '/_nomakepkg_nover=/ s/"false"/"true"/' wine-tkg-profiles/advanced-customization.cfg
125147

126-
sed -i "s|\"\$_prefix\"|$PKG\"\$_prefix\"|g" wine-tkg-scripts/build.sh
127-
sed -i "s|make install|make install DESTDIR=$PKG|g" wine-tkg-scripts/build.sh
128-
sed -i 's|_nomakepkg_pkgname="${pkgname}"|_nomakepkg_pkgname=""|g' wine-tkg-scripts/build.sh
129-
sed -i 's|_nomakepkg_pkgname="${pkgname}"|_nomakepkg_pkgname=""|g' non-makepkg-build.sh
130-
sed -i 's|local _prefix="${_nomakepkg_prefix_path}/${_nomakepkg_pkgname}"|local _prefix="${_nomakepkg_prefix_path}"|g' wine-tkg-scripts/build.sh
131-
sed -i 's|local _prefix="${_nomakepkg_prefix_path}/${_nomakepkg_pkgname}"|local _prefix="${_nomakepkg_prefix_path}"|g' non-makepkg-build.sh
148+
sed -i "s|\"\$_prefix\"|$PKG\"\$_prefix\"|g" wine-tkg-scripts/build.sh
149+
sed -i "s|make install|make install DESTDIR=$PKG|g" wine-tkg-scripts/build.sh
150+
sed -i "s|_nomakepkg_pkgname=\"\${pkgname}\"|_nomakepkg_pkgname=\"\"|g" wine-tkg-scripts/build.sh
151+
sed -i "s|_nomakepkg_pkgname=\"\${pkgname}\"|_nomakepkg_pkgname=\"\"|g" non-makepkg-build.sh
152+
153+
look_for="local _prefix=\"\${_nomakepkg_prefix_path}/\${_nomakepkg_pkgname}\""
154+
turn_into="local _prefix=\"\${_nomakepkg_prefix_path}\""
155+
sed -i "s|$look_for|$turn_into|g" wine-tkg-scripts/build.sh
156+
sed -i "s|$look_for|$turn_into|g" non-makepkg-build.sh
132157

133158
files_to_copy=$(find "$CWD/patches" -type f -name '[0-9][0-9][0-9][0-9]-*.mypatch' || \
134159
find "$CWD/patches" -type f -name '[0-9][0-9][0-9][0-9]-*.myrevert' || \
@@ -148,56 +173,61 @@ find -L . \
148173
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
149174

150175
./non-makepkg-build.sh || { rm -rf /tmp/wine-tkg; exit 1; }
176+
stty sane
151177

152-
153-
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
178+
find "$PKG" -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
154179
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
155180

156181
cd src/wine-git
157-
VERSION=$(cat VERSION | awk '{print $3}')
158-
VERSION=$(echo $VERSION | tr '-' . )
159182

160-
# Add a desktop menu for winecfg, wine-uninstaller, wine-browsedrive and doc:
161-
mkdir -p $PKG/usr/share/{applications,icons/hicolor/scalable/apps,pixmaps}
162-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
183+
VERSION=$(awk '{print $3}' VERSION)
184+
VERSION=$(echo "$VERSION" | tr '-' . )
163185

164-
DOCS="AUTHORS COPYING.LIB LICENSE* MAINTAINERS VERSION"
165-
FONTS_LICENSE="COPYING.arial COPYING.cour COPYING.msyh COPYING.times"
166-
cp $DOCS $FONTS_LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
167-
cp programs/winecfg/winecfg.svg $PKG/usr/share/icons/hicolor/scalable/apps/
186+
# Add a desktop menu for winecfg, wine-uninstaller, wine-browsedrive and doc:
187+
mkdir -p "$PKG/usr/share/"{applications,icons/hicolor/scalable/apps,pixmaps}
188+
mkdir -p "$PKG/usr/doc/$PRGNAM-$VERSION"
189+
DOCS=("AUTHORS" "COPYING.LIB" "LICENSE" "LICENSE.OLD" "MAINTAINERS" "VERSION")
190+
FONTS_LICENSE=("COPYING.arial" "COPYING.cour" "COPYING.msyh" "COPYING.times")
191+
cp "${DOCS[@]}" "${FONTS_LICENSE[@]}" "$PKG/usr/doc/$PRGNAM-$VERSION"
192+
cp programs/winecfg/winecfg.svg "$PKG/usr/share/icons/hicolor/scalable/apps/"
168193

169194
# clear source from tmp (can stop the user from being able to build in $HOME)
170195
cd ../..
171196
rm -rf /tmp/wine-tkg
172197

173198
# on slackware /usr/share/man is a symbolic link to /usr/man
174-
mv $PKG/usr/share/man $PKG/usr/man
175-
find $PKG/usr/man -type f -exec gzip -9 {} \;
176-
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
199+
mv "$PKG/usr/share/man" "$PKG/usr/man"
200+
find "$PKG/usr/man" -type f -exec gzip -9 {} \;
201+
find "$PKG/usr/man" -type l -exec sh -c '
202+
for i; do
203+
ln -s "$(readlink "$i").gz" "$i.gz"
204+
rm "$i"
205+
done
206+
' sh {} +
177207

178208
# Add font configuration:
179-
install -d $PKG/etc/fonts/conf.{avail,d}
180-
install -m644 $CWD/30-win32-aliases.conf $PKG/etc/fonts/conf.avail
181-
ln -sf /etc/fonts/conf.avail/30-win32-aliases.conf $PKG/etc/fonts/conf.d/30-win32-aliases.conf
182-
install -Dm 644 $CWD/wine-binfmt.conf $PKG/usr/lib/binfmt.d/wine.conf
209+
install -d "$PKG/etc/fonts/conf."{avail,d}
210+
install -m644 "$CWD/30-win32-aliases.conf" "$PKG/etc/fonts/conf.avail"
211+
ln -sf /etc/fonts/conf.avail/30-win32-aliases.conf "$PKG/etc/fonts/conf.d/30-win32-aliases.conf"
212+
install -Dm 644 "$CWD/wine-binfmt.conf" "$PKG/usr/lib/binfmt.d/wine.conf"
183213

184214
# Create Wine menu structure:
185-
mkdir -p $PKG/etc/xdg/menus/applications-merged
186-
cp $CWD/wine.menu $PKG/etc/xdg/menus/applications-merged
215+
install -Dm 644 "$CWD/wine.menu" "$PKG/etc/xdg/menus/applications-merged/wine.menu"
187216

188217
# icons and desktop files
189-
convert $CWD/wine.svg -scale 64 $PKG/usr/share/pixmaps/wine.png
190-
cp $CWD/wine.svg $PKG/usr/share/icons/hicolor/scalable/apps/
191-
convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/winecfg.png
192-
convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/folder-wine.png
193-
convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/wine-uninstaller.png
194-
cp $CWD/*.desktop $PKG/usr/share/applications/
218+
install -Dm 644 "$CWD/wine.svg" "$PKG/usr/share/icons/hicolor/scalable/apps/wine.svg"
219+
magick "$CWD/wine.svg" -scale 64 "$PKG/usr/share/pixmaps/wine.png"
220+
magick "$CWD/winecfg.png" -scale 64 "$PKG/usr/share/pixmaps/winecfg.png"
221+
magick "$CWD/winecfg.png" -scale 64 "$PKG/usr/share/pixmaps/folder-wine.png"
222+
magick "$CWD/winecfg.png" -scale 64 "$PKG/usr/share/pixmaps/wine-uninstaller.png"
223+
224+
find "$CWD" -maxdepth 1 -name "*.desktop" -exec install -m 644 {} "$PKG/usr/share/applications/" \;
195225

196-
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
226+
cat "$CWD/$PRGNAM.SlackBuild" > "$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild"
197227

198-
mkdir -p $PKG/install
199-
cat $CWD/slack-desc > $PKG/install/slack-desc
200-
cat $CWD/doinst.sh > $PKG/install/doinst.sh
228+
mkdir -p "$PKG/install"
229+
cat "$CWD/slack-desc" > "$PKG/install/slack-desc"
230+
cat "$CWD/doinst.sh" > "$PKG/install/doinst.sh"
201231

202-
cd $PKG
203-
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
232+
cd "$PKG"
233+
/sbin/makepkg -l y -c n "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"

0 commit comments

Comments
 (0)