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

[depends] bump libjpeg-turbo to 2.0.4 #17385

Merged
merged 2 commits into from
Feb 24, 2020
Merged

Conversation

Rechi
Copy link
Member

@Rechi Rechi commented Feb 19, 2020

How Has This Been Tested?

compiled libjpeg-turbo and it's dependencies for Android (aarch64, arm, i686), iOS (aarch64, arm), macOS and tvOS

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@@ -1,4 +1,9 @@
set(OS "@platform_os@")
set(CMAKE_SYSTEM_PROCESSOR @host_cpu@)
Copy link
Member

@AlwinEsch AlwinEsch Feb 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This in case of Raspberry not correct enough, there it is only "arm" without something else, also on Android 32bit it is only "arm".

EDIT: On libjpeg-turbo it checks only about "arm*" and it works, but not sure if on all possible depends (specially by addons) correct.

Copy link
Member

@AlwinEsch AlwinEsch Feb 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See about Android here the standardized values of them https://github.com/Kitware/CMake/blob/master/Modules/Platform/Android-Determine.cmake#L243-L252 (on ..._PROC)

Copy link
Member

@AlwinEsch AlwinEsch Feb 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm torn, which would be better 😄, if you go here it is fully OK https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html.

Now looked over hundreds of CMakeLists.txt on the web, with the set(CMAKE_SYSTEM_PROCESSOR ...) many use it completely (e.g. armv7l), but in the comparison I saw everywhere only for "arm" alone.

  • The most make a if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
  • Some are stupid and make a if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm"
  • Some half stupid and make a if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")

Then this path is actually OK, just a shame because of my work 😢 😆 😎.

@Rechi Rechi force-pushed the depends/jpeg-turbo branch 2 times, most recently from 1bd54d3 to f8efd2e Compare February 21, 2020 08:33
- enables clang-check, cppcheck and valgrind features for depends builds targeting the same system and processor as the host system
- libjpeg-turbo 2.0.0 switched to cmake and requires this variable
@@ -24,14 +19,14 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); $(CONFIGURE)
cd $(PLATFORM); patch -p1 -i ../01-disable-executables.patch
cd $(PLATFORM); $(CMAKE) -B build -DCMAKE_TOOLCHAIN_FILE= -DCMAKE_ASM_NASM_COMPILER:FILEPATH=$(NATIVEPREFIX)/bin/yasm -DENABLE_SHARED:BOOL=OFF -DWITH_JPEG8:BOOL=ON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the DCMAKE_ASM_NASM_COMPILER is it worth using the existing NASM var?

NASM=@prefix@/@tool_dir@/bin/yasm

also, purely for reference if anyone looks in the future, libjpeg-turbo build docs say it can use either yasm or nasm, with some caveats around macos nasm min version apparently

If using NASM, 2.10 or later is required.
If using NASM, 2.10 or later (except 2.11.08) is required for an x86-64 Mac build (2.11.08 does not work properly with libjpeg-turbo's x86-64 SIMD code when building macho64 objects.)
If using YASM, 1.2.0 or later is required.
If building on macOS, NASM or YASM can be obtained from MacPorts or Homebrew.
NOTE: Currently, if it is desirable to hide the SIMD function symbols in Mac executables or shared libraries that statically link with libjpeg-turbo, then NASM 2.14 or later or YASM must be used when building libjpeg-turbo.

https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/BUILDING.md

@Rechi Rechi merged commit 9cdb7d0 into xbmc:master Feb 24, 2020
@Rechi Rechi deleted the depends/jpeg-turbo branch February 24, 2020 08:10
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 24, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Feb 26, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[depends] bump libjpeg-turbo to 2.0.4
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
[depends] bump libjpeg-turbo to 2.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants