my @source_pkgs = (
{"name" => "disabled-v8",
- "force-rebuild" => 0,
- "use_depot_tools" => 1,
- "repo" => "https://chromium.googlesource.com/v8/v8.git",
- "depot_tools_repo" => "https://chromium.googlesource.com/chromium/tools/depot_tools.git",
-
- # original version used with DALi is 3.25.19. 3.32.7 is the latest we can use before
- # upgrading DALi to use c++0x or c++11
- "version" => " 3.32.7", "make" => "make -j8 library=shared", "build-mode" =>"debug" },
+ "force-rebuild" => 0,
+ "use_depot_tools" => 1,
+ "repo" => "https://chromium.googlesource.com/v8/v8.git",
+ "depot_tools_repo" => "https://chromium.googlesource.com/chromium/tools/depot_tools.git",
+
+ # original version used with DALi is 3.25.19. 3.32.7 is the latest we can use before
+ # upgrading DALi to use c++0x or c++11
+ "version" => " 3.32.7", "make" => "make -j8 library=shared", "build-mode" =>"debug" },
-
- {"name" => "emscripten",
- "portable" => "https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz"
- }
);
### Detect any http proxy, part of v8 installation requires this information
my $src_path = "$root_path/src-packages";
my $sbs_path = "$root_path/target";
my $install_path = "$root_path/opt";
- my $emscripten_path = "$root_path/emsdk_portable";
+my $vulkan_path = "$root_path/vulkan";
my $opt_create=0;
my $opt_setenv=0;
my $opt_help=0;
my $opt_man=0;
- my $opt_emscripten=0;
-
-GetOptions("create" => \$opt_create,
- "setenv" => \$opt_setenv,
- "help" => \$opt_help,
- "man" => \$opt_man) or pod2usage(2);
+my $opt_vulkan=0;
+my $opt_vulkanVersion="";
+my $opt_vulkanList=0;
+
+GetOptions("create" => \$opt_create,
+ "setenv" => \$opt_setenv,
- "emscripten" => \$opt_emscripten,
+ "vulkan" => \$opt_vulkan,
+ "vulkan-version=s" => \$opt_vulkanVersion,
+ "vulkan-version-list" => \$opt_vulkanList,
+ "help" => \$opt_help,
+ "man" => \$opt_man) or pod2usage(2);
pod2usage(1) if $opt_help;
pod2usage(-exitstatus => 0, -verbose => 2) if $opt_man;
sub create_setenv
{
- if( ( -d $emscripten_path ) || $opt_emscripten )
- {
- print <<"EOF";
- #
- # Emscripten environment
- # - which brazenly overwrites PATH so we set this first
- # - NB: If you change the tools within emsdk then you'll need to recreate this file
- #
-
- EOF
- my $emsdk_env_file = $emscripten_path . '/emsdk_set_env.sh';
- open(FILE, $emsdk_env_file) or die "Can't read file enscripten env file" . $emsdk_env_file;
- my @emsdk_env = <FILE>;
- close (FILE);
- print @emsdk_env;
- }
-
+ my $vulkan_library_path = "";
+ my $vulkan_sdk_path = "";
+ if( ( -d $vulkan_path ) )
+ {
+ my $vulkan_version = readlink( "$vulkan_path/latest" );
+ $vulkan_library_path = "\${VULKAN_SDK}/lib:";
+ $vulkan_sdk_path =
+ "export VULKAN_VERSION=$vulkan_version\n" .
+ "export VULKAN_SDK=$vulkan_path/\${VULKAN_VERSION}/x86_64\n" .
+ "export VK_LAYER_PATH=\"\${VULKAN_SDK}/etc/explicit_layer.d\""
+ }
+
print <<"EOF";
#
# To use the desktop libraries, please add the following lines to your .bashrc or
# \$ CXXFLAGS="-g -O0" ./configure --prefix=\$DESKTOP_PREFIX
export DESKTOP_PREFIX=$install_path
+$vulkan_sdk_path
export PATH=$install_path/bin:\$PATH
-export LD_LIBRARY_PATH=$install_path/lib:\$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=$vulkan_library_path$install_path/lib:\${LD_LIBRARY_PATH:-}
export INCLUDEDIR=$install_path/include
export PKG_CONFIG_PATH=$install_path/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
-
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DALI_WINDOW_WIDTH=480
export DALI_WINDOW_HEIGHT=800
Cflags: -I\${includedir}
END
- my $filename = $install_path . "/lib/pkgconfig/" . "v8.pc";
- print("writing to file ". $filename . "\n");
- my $fh;
- if( open( $fh, '>', $filename ) )
- {
- print { $fh } $fileContents;
- close( $fh );
- }
- else
- {
- die "failed to create " . $filename ."\n";
- }
+ my $filename = $install_path . "/lib/pkgconfig/" . "v8.pc";
+ print("writing to file ". $filename . "\n");
+ my $fh;
+ if( open( $fh, '>', $filename ) )
+ {
+ print { $fh } $fileContents;
+ close( $fh );
+ }
+ else
+ {
+ die "failed to create " . $filename ."\n";
+ }
- print("Installed V8 " .$v8Version . " OK\n");
+ print("Installed V8 " .$v8Version . " OK\n");
-#####
+ #####
+ #
+ ####
+ my $versionFile;
+ open( $versionFile, '>', $versionTextFile );
+ close( $versionFile );
+ print("Installing V8 version $v8Version\n");
+
+}
+
+################################################################################
#
- # install the latest emscripten in a portable directory
- #
- ################################################################################
- sub install_emscripten
- {
- my $info = $_[0];
- my $ret;
- print( "Checking if Emscripten is up to date\n");
-
- my $portable = $info->{"portable"};
-
- my $current_dir = getcwd();
-
- print( "\n");
- print( "Installing or updating Emscripten.\n");
- print( ".....You may need a cup of tea.\n");
- print( ".......... In fact, take the afternoon off.\n");
- print( "\n");
-
- if(-e $emscripten_path)
- {
- chdir( $emscripten_path );
- }
- else
- {
- chdir( $root_path );
-
- system("curl -O " . $portable) == 0
- or die "curl failed with error $?. :" . $portable;
-
- my($filename, $dirs, $suffix) = fileparse($portable);
-
- system("tar -xvf " . $filename . $suffix) == 0
- or die "tar unpack failed (nb tar.gz is the presumed downloaded format):" . $filename . $suffix;
-
- system("rm " . $filename . $suffix) == 0
- or die "Cannot remove emsdk portable tar file:" . $filename . $suffix;
-
- chdir( $emscripten_path );
- }
-
- system("./emsdk update") == 0
- or die "Cannot run emsdk? Did the install fail?";
-
- system("./emsdk install latest");
- system("./emsdk activate latest");
- system("bash -c \"source ./emsdk_env.sh\""); # emsdk uses popd ie expects bash
-
- system("emsdk list");
-
- chdir($current_dir);
- }
-
- ################################################################################
- #
-####
- my $versionFile;
- open( $versionFile, '>', $versionTextFile );
- close( $versionFile );
- print("Installing V8 version $v8Version\n");
+# install Vulkan SDK
+#
+################################################################################
+sub install_vulkan {
+ if($opt_vulkan || $opt_vulkanList)
+ {
+ my $requestedVersion = "$opt_vulkanVersion";
+ my $vulkanInstallDir = $vulkan_path;
+ # Get Download page
+ my $vulkan_sdk_url = "https://vulkan.lunarg.com/sdk/home#sdk/downloadConfirm/";
+ my $vulkan_download_page = `curl --silent $vulkan_sdk_url`;
+
+ # Find available VulkanSDK versions
+ my (@linuxVersion) = $vulkan_download_page =~ /linux: .*$/mg;
+
+ my (@version) = $linuxVersion[0] =~ /\"[0-9.]*\"/g;
+ my @allVersions = ();
+ if($opt_vulkanList)
+ {
+ print("\nVulkanSDK Versions available:\n");
+ }
+ foreach my $ver (@version)
+ {
+ $ver =~ s/\"//g;
+ push @allVersions, $ver;
+ if($opt_vulkanList)
+ {
+ print(" * $ver\n");
+ }
+ }
+ if($opt_vulkanList)
+ {
+ return;
+ }
+
+ # get args
+ my ($dev_env_root) = @_;
+
+ # if no particular version requested, pick latest one
+ if ($requestedVersion eq "")
+ {
+ $requestedVersion = $allVersions[0];
+ }
+ else # or check availability
+ {
+ my $found = 0;
+ foreach my $ver (@allVersions)
+ {
+ if ($ver eq $requestedVersion)
+ {
+ $found = 1;
+ last;
+ }
+ }
+ if ($found eq 0)
+ {
+ print("Requested version [$requestedVersion] not found! Available versions:\n\n");
+ foreach my $ver (@allVersions)
+ {
+ print(" * $ver\n");
+ }
+ die;
+ }
+ }
+
+ # Download SDK
+ my $vulkan_download_url =
+ "https://vulkan.lunarg.com/sdk/download/$requestedVersion/linux/vulkansdk-linux-x86_64-$requestedVersion.run?Human=true";
+ print("* Downloading Vulkan SDK Version $requestedVersion...\n");
+ print(" -> URL: $vulkan_download_url\n");
+ system( 'curl', '--silent', '-o', '/tmp/vulkan_installer.sh', "$vulkan_download_url");
+
+ if ($? == - 1)
+ {
+ die "Failed to download Vulkan SDK, exiting!\n";
+ }
+
+ # Run installer
+ print(" -> Installing VulkanSDK...\n");
+ system( 'chmod', 'a+x', "/tmp/vulkan_installer.sh");
+ system( "/tmp/vulkan_installer.sh --target /tmp/vulkan-$requestedVersion");
+ pathmk( "$vulkanInstallDir/$requestedVersion" );
+ dircopy( "/tmp/vulkan-$requestedVersion/$requestedVersion", "$vulkanInstallDir/$requestedVersion" );
+
+ # create symling to the recently installed as 'latest'
+ symlink( "$requestedVersion", "$vulkanInstallDir/latest" );
+
+ # configure
+ my $vulkanAbsDir = "$vulkanInstallDir/latest";
+
+ my $envsetup = <<EOF
+# VulkanSDK env variables
+
+export VULKAN_SDK="$vulkanAbsDir/x86_64"
+export PATH="\$VULKAN_SDK/bin:\$PATH"
+export LD_LIBRARY_PATH="\$VULKAN_SDK/lib:\${LD_LIBRARY_PATH:-}"
+export VK_LAYER_PATH="\$VULKAN_SDK/etc/explicit_layer.d"
+
+EOF
+ ;
+
+ open(my $file, '>', "$vulkanInstallDir/vulkan-setenv") or die;
+ print $file $envsetup;
+ close( $file );
+
+ # write pkg-config file
+
+ my $pkg_config_body = <<EOF
+prefix=$vulkanInstallDir/$requestedVersion/x86_64
+exec_prefix=\${prefix}
+apiversion=$requestedVersion
+libdir=\${prefix}/lib
+includedir=\${prefix}/include
+
+Name: LunarG VulkanSDK
+Description: LunarG VulkanSDK
+Version: \${apiversion}
+Requires:
+Libs: -L\${libdir} -lvulkan
+Cflags: -I\${includedir}
+
+EOF
+ ;
+
+ # write additional pkg-config file for local Vulkan
+ open(my $file2, '>', "$dev_env_root/opt/lib/pkgconfig/vulkan-1.0.pc") or die;
+ print $file2 $pkg_config_body;
+ close( $file2 );
+ }
}
################################################################################
[enable_gles=$enableval],
[enable_gles=20])
+ AC_ARG_ENABLE([cxx03_abi],
+ [AC_HELP_STRING([--enable-cxx03-abi],
+ [Specify abi for the build])],
+ [enable_cxx03_abi=$enableval],
+ [enable_cxx03_abi=no])
+
+ AC_ARG_ENABLE([rename_so],
+ [AC_HELP_STRING([--enable-rename-so],
+ [Specify whether so file is renamed or not])],
+ [enable_rename_so=$enableval],
+ [enable_rename_so=yes])
+
+ AM_CONDITIONAL([ENABLE_CXX03_ABI], [test x$enable_cxx03_abi = xyes])
+ AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
+
+ if test "x$enable_cxx03_abi" = "xyes"; then
+ DALI_CFLAGS="$DALI_CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
+ fi
+
+AC_ARG_ENABLE([vulkan],
+ [AC_HELP_STRING([--enable-vulkan],
+ [Enables Vulkan support])],
+ [enable_vulkan=$enableval],
+ [enable_vulkan=no])
+
DALI_CFLAGS="$DALI_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
if test "x$enable_debug" = "xyes"; then
devincludepath=${includedir}
AC_SUBST(devincludepath)
- AC_CONFIG_FILES([
- Makefile
- dali-core/Makefile
- dali-core/graphics/Makefile
- dali-core.pc
- ])
-AC_CONFIG_FILES([Makefile dali-core/Makefile])
++AC_CONFIG_FILES([Makefile dali-core/Makefile dali-core/graphics/Makefile])
+
+ if test "x$enable_cxx03_abi" = "xyes"; then
+ AC_CONFIG_FILES([dali-core-cxx03.pc])
+ fi
+
+ if test "x$enable_cxx03_abi" != "xyes"; then
+ AC_CONFIG_FILES([dali-core.pc])
+ fi
AC_OUTPUT
Debug Build: $enable_debug
Data Dir (Read/Write): $dataReadWriteDir
Data Dir (Read Only): $dataReadOnlyDir
- Emscripten: $enable_emscripten
Backtrace: $enable_backtrace
ScopedLock Backtrace: $enable_lock_backtrace
+ Vulkan Support: $enable_vulkan
"