Open lillolollo opened 5 years ago
@lillolollo show your PKGBUILD and build log
seems to be an problem with a macro
configure.ac:134: error: possibly undefined macro: AC_MSG_WARN If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. I'm building with no flags
@lillolollo at least you try to run autoreconf
or autoconf
the problem to build directly gjs on mingw is
xtracting gjs-1.57.4.zip with bsdtar
gjs-1.57.4/README: Can't create 'gjs-1.57.4/README'
bsdtar: Error exit delayed from previous errors.
We have many packages with this error because symlink not supported on windows. So this is not your issue with building
but MINGW_INSTALLS=mingw64 makepkg-mingw -sCLf don't work because this error
Don't we need spidermonkey first?
@lazka yes he need spidermonkey too
tar -xf ${_realname}-${pkgver}.tar.gz || tar -xf ${_realname}-${pkgver}.tar.gz
tar can't find the link file when decompressing for the first time, the second time tar can find it.
@smalltalkman @Alexpux Thanks I have resolved the README error
_realname=gjs
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.57.4
pkgrel=1
pkgdesc="GNOME Javascript bindings"
arch=('any')
url="https://gitlab.gnome.org/GNOME/gjs"
license=('MIT and LGPLv2+')
source=("${_realname}-${pkgver}.tar.gz::https://gitlab.gnome.org/GNOME/${_realname}/-/archive/${pkgver}/${_realname}-${pkgver}.tar.gz")
md5sums=('SKIP')
noextract=("${_realname}-${pkgver}.tar.gz")
prepare() {
tar xf "${_realname}-${pkgver}.tar.gz" --exclude=README
cd "${srcdir}/${_realname}-${pkgver}"
./autogen.sh
}
build() {
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
mkdir "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
../${_realname}-ng-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
make
}
package() {
cd "${srcdir}"/build-${CARCH}
make DESTDIR="${pkgdir}"/ install
install -Dm644 ${srcdir}/${_realname}-ng-${pkgver}/COPYING \
${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
}
But the AC_MSG_WARN is still here
@lillolollo Before building gjs, you have to build Js60 (part of firefox's javascript runtime)
Also, it has been reported in some places as a syntax error.
This patch fixes it :
diff --git a/configure.ac b/configure.ac
index 1e58000c..518e3aa5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,7 +134,7 @@ AM_CONDITIONAL(ENABLE_CAIRO, test x$have_cairo = xyes)
AS_IF([test x$have_cairo = xyes], [
AC_DEFINE([ENABLE_CAIRO],[1],[Define if you want to build with cairo support])
AX_PKG_CHECK_MODULES([GJS_CAIRO_XLIB], [], [cairo-xlib], [],
- [AC_MSG_WARN([Cairo-xlib support not found])])
+ AC_MSG_WARN([Cairo-xlib support not found]))
], [AS_IF([test "x$with_cairo" = "xyes"],
[AC_MSG_ERROR([Cairo requested but not found])])])
@@ -372,16 +372,16 @@ AC_CONFIG_LINKS([
AC_OUTPUT
# Warn about conditions that affect runtime
-PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 1.61.2], [], [
+PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 1.61.2], [],
AC_MSG_WARN([You do not have a new enough version of
gobject-introspection to run the tests. You can still build GJS, but some
-tests will fail.])])
+tests will fail.]))
-AS_IF([test "$TESTS_LOCALE" = "C"], [
+AS_IF([test "$TESTS_LOCALE" = "C"],
AC_MSG_WARN([Your libc does not have the C.UTF-8 locale and no other
suitable UTF-8 fallback locale could be found. You can still build GJS, but
some tests will fail.])
-])
+)
TEST_MSG=
AM_COND_IF([DBUS_TESTS], [TEST_MSG="dbus-run-session"])
Just for information: is spidermonkey and/or gjs like extra-hard to build for Windows?
I just want to know if this is about nobody really trying to make the package (but it might happen) or if this is like a notoriously hell package to make or something like this (the later is what I think I understood from our Windows packager).
So that I know if we should just not expect having support for JS scripts on Windows anytime soon. Thanks! :-)
Firefox developers are doing something about that https://github.com/msys2/MINGW-packages/discussions/10526
Nice. Thanks @Biswa96. Hopefully we'll see this happen at some point in the near future. :-)
@Biswa96 @Jehan In this case the good news would be that mozilla ship a separate package for spidermonkey. It is worth to install firefox (~100M) to use gjs to use (maybe) gimp js scripts?
This is the archlinux PKGBUILD https://github.com/archlinux/svntogit-packages/blob/packages/js78/trunk/PKGBUILD for the js engine
@lillolollo I don't see a MSYS2 package for firefox. Unless you mean the official Firefox installer?
In any case, no, we are not going to make Firefox a dependency of GIMP. 🤣
@Jehan seems now firefox can be build with MSYS2 https://bugzilla.mozilla.org/show_bug.cgi?id=1725895 https://wiki.mozilla.org/MozillaBuild this is the new SpiderMonkey pakage https://github.com/archlinux/svntogit-packages/blob/master/js91/trunk/PKGBUILD but I haven't the required skills to do it maybe @lazka @Biswa96 or @mitchhentges can help
We'd be thrilled to have gjs under Windows for Javascript plug-ins support. I won't be doing it, this is for sure. But I'd welcome the package coming in. 👍
The libpeas library had supportted the gjs, it's nice to see it be done.
Please can you add gjs pakage https://github.com/GNOME/gjs needed by gimp I tried to build it for mingw with no success