Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78262 - [erlang] Typo: WX_GKT_VER -> WX_GTK_VER at line 37

Attached to Project: Community Packages
Opened by Tamer Fahmy (tuhtah) - Wednesday, 19 April 2023, 13:43 GMT
Last edited by Alexander F. Rødseth (xyproto) - Monday, 26 June 2023, 19:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

While studying the erlang PKGBUILD I noticed a typo for the WX_GTK_VER environment variable at Line 37
(see: https://github.com/archlinux/svntogit-community/blob/packages/erlang/trunk/PKGBUILD#L37)

Fixing the typo still produces a build.

Question is: Is that environment variable truly needed and should it be set at all?
It was introduced 3 years ago in this commit: https://github.com/archlinux/svntogit-community/commit/0ad46b36627539c9fd96b0a6c3fc94a6b0dc8478
However, that commit also had an explicit `--with-wx-config=/usr/bin/wx-config-gtk3` set which isn't present anymore.

From the looks of it, this apparently was an attempt to workaround an autotools configure build selection problem at a time where a wxwidgets-gtk2 package could also be present.
It doesn't seem to be needed anymore. Furthermore, I could not find any traces of a WX_GTK_VER variable in the OTP 25.3 sources nor the wx-config utility.

I would therefore argue to remove the `export WX_GKT_VER='3.2'` line to avoid confusion.

Find an updated PKGBUILD attached. The new PKGBUILD also uses Erlang release tar-balls (for both man pages and OTP sources) instead of the git repository (which equally seems to be a remnant of an earlier workaround).

If this patch is considered, then maybe it is better to rather apply it for the imminent Erlang/OTP 26.0 release.
Finally, the erlang-nox PKGBUILD should then also be updated in the same way.


```diff
--- PKGBUILD-25.3-1 2023-04-19 13:30:59.605015098 +0200
+++ PKGBUILD-25.3-2 2023-04-19 15:21:50.795654207 +0200
@@ -9,33 +9,35 @@
pkgbase=erlang
pkgname=(erlang erlang-unixodbc)
pkgver=25.3
-pkgrel=1
-_docver=25.0
+pkgrel=2
+
arch=(x86_64)
+
url='https://erlang.org'
license=(Apache)
+
makedepends=(fop git glu java-environment libxslt lksctp-tools mesa perl unixodbc wxwidgets-gtk3)
options=(staticlibs)
+
source=(epmd.conf
epmd.service
epmd.socket
- "$url/download/otp_doc_man_$_docver.tar.gz"
- "git+https://github.com/erlang/otp#commit=5400ccf243a31d664153a4b9ceb9de3edfce1e0e") # tag: OTP-25.3
+ "https://github.com/erlang/otp/releases/download/OTP-$pkgver/otp_doc_man_$pkgver.tar.gz"
+ "https://github.com/erlang/otp/releases/download/OTP-$pkgver/otp_src_$pkgver.tar.gz")
b2sums=('1675ac9bf948ab19e8b63077d870ccf356fcdbce14de2777f00b3488aa1ce34a5e0a5cdc0428707f744dee5940b12653a44e0ded0554de95ebb31bce4676ff87'
'1f765318bcd322ce697a48c064ccdb1bd107b4a84e164a87f62678391cb82a9ab17a397d679cf266e037a5a2d91772b85f7a97f9cc5478c0f18118743b30045f'
'c37706f5f6e2d49100104fb442ebf15edd6ee0a1e8038d0364794cf34fd3f02a61b9ad2706228b3327b85b0cadcd11aac6087e7c98408eae2d307a09191b6553'
- 'cb48044163b265fb339b774a854662705d1bdf52cfabf3d4a268538c5e53b984c3d26f05acea2f217a1bf6e838469564cef1a4c591d9af43980e1d8f422c43fd'
- 'SKIP')
+ 'd3d91e5920648ddb5b8375c969586b904d743f1d60acbefddd98577bd11b82246a2f149fdaa8ff1d16e8efc9f3793ce1dbc61efc9bc28c68f50919460d1e8e24'
+ '56da0aed5710baef674748964cf3af36141297de0d403483b98122e2dc34c3b56c6ab9a5621c615b807ee7ee2825c1a1da3f3702125af8230040f950f2c418f1')

prepare() {
# adjust how LDFLAGS are handled
- sed -i 's/^LDFLAGS = /LDFLAGS += /g' otp/lib/{odbc/c_src,megaco/src/flex}/Makefile.in
+ sed -i 's/^LDFLAGS = /LDFLAGS += /g' otp_src_"$pkgver"/lib/{odbc/c_src,megaco/src/flex}/Makefile.in
}

build() {
export CFLAGS+=' -ffat-lto-objects'
- export WX_GTK_VER='3.2'
- cd otp
+ cd otp_src_"$pkgver"
./otp_build autoconf
./configure \
--enable-builtin-zlib \
@@ -55,7 +57,7 @@
conflicts=(erlang-nox)

export PATH="$srcdir/bin:$PATH"
- make -C otp DESTDIR="$pkgdir" DOC_TARGETS=chunks install install-docs
+ make -C otp_src_"$pkgver" DESTDIR="$pkgdir" DOC_TARGETS=chunks install install-docs

# move files that belong to the erlang-unixodbc package
mkdir -p unixodbc
@@ -67,10 +69,11 @@
install -Dm644 epmd.conf "$pkgdir/etc/conf.d/epmd"

# readme and licenses
- install -Dm644 otp/README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
- install -Dm644 otp/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm644 otp/CONTRIBUTING.md "$pkgdir/usr/share/doc/$pkgname/CONTRIBUTING.md"
- install -Dm644 otp/AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUTHORS"
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ install -Dm644 otp_src_"$pkgver"/{AUTHORS,CONTRIBUTING.md,README.md} \
+ "$pkgdir/usr/share/doc/$pkgname/"
+ install -Dm644 otp_src_"$pkgver"/LICENSE.txt \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENCE"

# man pages
cp -r -v man "$pkgdir/usr/lib/erlang/"
@@ -82,8 +85,8 @@

install -d "$pkgdir/usr/lib/erlang/lib"
mv unixodbc/* "$pkgdir/usr/lib/erlang/lib/"
- install -Dm644 otp/LICENSE.txt \
- "$pkgdir/usr/share/licenses/$pkgname/LICENCE.txt"
+ install -Dm644 otp_src_"$pkgver"/LICENSE.txt \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
}

# getver: raw.githubusercontent.com/erlang/otp/maint/OTP_VERSION
```
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Monday, 26 June 2023, 19:16 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Monday, 12 June 2023, 08:47 GMT
Thanks for reporting, I'll look into it.
Comment by Alexander F. Rødseth (xyproto) - Monday, 26 June 2023, 19:16 GMT
Updated the package.

I like using git directly, though, because it can sometimes remove an opportunity for human error when upstream creates the tar-balls.

Loading...