Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wizard recipe: libgmime-v3.2.15 #9427

Merged

Conversation

AlexKlo
Copy link
Contributor

@AlexKlo AlexKlo commented Sep 14, 2024

This pull request contains a new build recipe I built using the BinaryBuilder.jl wizard:

  • Package name: libgmime
  • Version: v3.2.15

@staticfloat please review and merge.

AlexKlo and others added 3 commits September 14, 2024 12:49
Add all supported_platforms and new lib names
Exclude aarch64-FreeBSD
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
L/libgmime/build_tarballs.jl Outdated Show resolved Hide resolved
@AlexKlo AlexKlo requested a review from giordano September 17, 2024 07:44
G/gmime/build_tarballs.jl Outdated Show resolved Hide resolved
G/gmime/build_tarballs.jl Outdated Show resolved Hide resolved
G/gmime/build_tarballs.jl Outdated Show resolved Hide resolved
@giordano
Copy link
Member

giordano commented Sep 19, 2024

diff --git a/G/gmime/build_tarballs.jl b/G/gmime/build_tarballs.jl
index 59a4e099b..e453a2f04 100644
--- a/G/gmime/build_tarballs.jl
+++ b/G/gmime/build_tarballs.jl
@@ -7,7 +7,8 @@ version = v"3.2.15"
 
 # Collection of sources required to complete build
 sources = [
-    ArchiveSource("https://github.com/jstedfast/gmime/releases/download/$(version)/gmime-$(version).tar.xz", "84cd2a481a27970ec39b5c95f72db026722904a2ccf3fdbd57b280cf2d02b5c4")
+    ArchiveSource("https://github.com/jstedfast/gmime/releases/download/$(version)/gmime-$(version).tar.xz",
+                  "84cd2a481a27970ec39b5c95f72db026722904a2ccf3fdbd57b280cf2d02b5c4")
 ]
 
 # Bash recipe for building across all platforms
@@ -18,12 +19,16 @@ echo '#define ICONV_ISO_STR_FORMAT "iso-%u-%s"' >> iconv-detect.h
 echo '#define ICONV_SHIFT_JIS "shift-jis"' >> iconv-detect.h
 echo '#define ICONV_10646 "UCS-4BE"' >> iconv-detect.h
 
-export LDFLAGS="-liconv"
-export CMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries"
+if [[ "${target}" == *-apple-* ]]; then
+   # Help the linker prefer our libiconv over system's libiconv.
+   export LDFLAGS="-L${libdir}"
+fi
 
 ./configure --prefix=${prefix} \
             --build=${MACHTYPE} \
             --host=${target} \
+            --enable-static=no \
+            --with-libiconv=gnu \
             ac_cv_have_iconv_detect_h=yes
 make -j${nproc}
 make install
@@ -31,7 +36,7 @@ make install
 
 # These are the platforms we will build for by default, unless further
 # platforms are passed in on the command line
-platforms = supported_platforms(exclude=[Platform("aarch64", "FreeBSD")])
+platforms = supported_platforms(; exclude=p -> Sys.isfreebsd(p) && arch(p) == "aarch64")
 
 
 # The products that we will ensure are always built
@@ -42,7 +47,7 @@ products = [
 # Dependencies that must be installed before this package can be built
 dependencies = [
     Dependency(PackageSpec(name="Glib_jll", uuid="7746bdde-850d-59dc-9ae8-88ece973131d"); compat="2.68.1")
-    BuildDependency(PackageSpec(name="Libiconv_jll", uuid="94ce4f54-9a6c-5748-9c1c-f9c7231a4531"))
+    Dependency(PackageSpec(name="Libiconv_jll", uuid="94ce4f54-9a6c-5748-9c1c-f9c7231a4531"))
 ]
 
 # Build the tarballs, and possibly a `build.jl` as well.

This works for me on all the platforms I tried (x86_64 for all different OSes). No need to use obscure linker flags, nor explicit -liconv. Please apply this patch.

@AlexKlo
Copy link
Contributor Author

AlexKlo commented Sep 19, 2024

Now script looks better! Thank you very much @giordano , you really helped me!

@giordano
Copy link
Member

Thanks for your contribution!

@giordano giordano merged commit ece2125 into JuliaPackaging:master Sep 19, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants