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

chore: Update to latest libexif. #954

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,16 @@ http_archive(
urls = ["https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2"],
)

# https://ftp.gnu.org/pub/gnu/gettext
http_archive(
nixpkgs_package(
name = "gettext",
build_file = "@toktok//third_party:gettext.BUILD",
sha256 = "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0",
strip_prefix = "gettext-0.22.5",
urls = ["https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz"],
attribute_path = "gettext",
repository = "@nixpkgs",
)

nixpkgs_package(
name = "xz",
attribute_path = "xz",
repository = "@nixpkgs",
)

nixpkgs_package(
Expand Down Expand Up @@ -589,9 +592,9 @@ http_archive(
# https://github.com/libexif/libexif
new_github_archive(
name = "libexif",
integrity = "sha256-tsLrkGxLL/VgM1k3AF9M5Ev02UCzGllAcUSI9usAOQU=",
repo = "libexif/libexif",
sha256 = "8e418041aba29a956eaf4ae1e0aa46bbc1a73d66916f6c3bf596067f13f942a5",
version = "00ee559ac8293c6ab9b0b4d26d3650ec89d2b1fc",
version = "8f013418c2ee71f7aaa81b1699e48d9d3c22dd9b",
)

http_archive(
Expand Down
16 changes: 0 additions & 16 deletions third_party/gettext.BUILD

This file was deleted.

30 changes: 27 additions & 3 deletions third_party/libexif.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,39 @@ genrule(
],
outs = ["config.h"],
cmd = """
cd `dirname $(location configure.ac)`
autoreconf -fi
./configure
BASE=`pwd`
export PATH="$$PATH:$$BASE/$$(dirname $(location @autoconf//:autoconf))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @automake//:aclocal))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @diffutils//:cmp))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @gettext//:bin/autopoint))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @libtool//:libtoolize))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @m4))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @xz//:bin/xz))"
SRCDIR="$$(dirname $(location configure.ac))"
autoreconf -fi -I "$$PWD/$$(dirname $(location @libtool//:libtool.m4))" "$$SRCDIR"

cd "$$SRCDIR"
./configure CC="$(CC)" AR="$(AR)" MAKE="$$BASE/$(location @gnumake)" || (cat config.log && false)
DIR=`pwd`
cd -
for i in $(OUTS); do
cp $$DIR/`echo $$i | sed -e 's|$(GENDIR)/external/libexif/||'` $$i
done
""",
toolchains = ["@rules_cc//cc:current_cc_toolchain"],
tools = [
"@autoconf",
"@autoconf//:autoreconf",
"@automake",
"@automake//:aclocal",
"@diffutils//:cmp",
"@gettext//:bin/autopoint",
"@gnumake",
"@libtool//:libtool.m4",
"@libtool//:libtoolize",
"@m4",
"@xz//:bin/xz",
],
)

genrule(
Expand Down
50 changes: 36 additions & 14 deletions third_party/libexif/linux/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@
language is requested. */
#define ENABLE_NLS 1

/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */

/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */

/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
*/
#define HAVE_DCGETTEXT 1

/* Define to 1 if you have the <dlfcn.h> header file. */
Expand All @@ -15,21 +23,24 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#define HAVE_GETTEXT 1

/* Define if you have the iconv() function. */
/* Define if you have the iconv() function and it works. */
#define HAVE_ICONV 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `localtime_r' function. */
/* Define to 1 if you have the 'localtime_r' function. */
#define HAVE_LOCALTIME_R 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have localtime_s() */
/* #undef HAVE_LOCALTIME_S */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

Expand All @@ -49,7 +60,7 @@
#define HAVE_UNISTD_H 1

/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST
#define ICONV_CONST

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
Expand All @@ -64,27 +75,38 @@
#define PACKAGE_NAME "EXIF library"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "EXIF library 0.6.21"
#define PACKAGE_STRING "EXIF library 0.6.24.1"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libexif"

/* Define to the home page for this package. */
#define PACKAGE_URL ""
#define PACKAGE_URL "https://libexif.github.io/"

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.6.21"
#define PACKAGE_VERSION "0.6.24.1"

/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "0.6.21"
#define VERSION "0.6.24.1"

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

/* Define to 1 on platforms where this makes off_t a 64-bit type. */
/* #undef _LARGE_FILES */

/* Number of bits in time_t, on hosts where this is settable. */
/* #undef _TIME_BITS */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
/* #undef __MINGW_USE_VC2005_COMPAT */

/* Define to `__inline__' or `__inline' if that's what the C compiler
/* Define to '__inline__' or '__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
Expand Down
Loading