Skip to content

Commit

Permalink
Revert update of autotools build to new toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
planetmarshall committed Jan 5, 2023
1 parent f47aeab commit fa27bc7
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 272 deletions.
20 changes: 6 additions & 14 deletions recipes/cairo/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,16 @@ sources:
patches:
"1.17.4":
- patch_file: "patches/0001-msvc-update-build-scripts-to-compile-with-more-featu.patch"
patch_type: portability
patch_description: support more features in MSVC build
base_path: "source_subfolder"
- patch_file: "patches/binutils-2.34-libbfd-fix.patch"
patch_description: "fix build with newer versions of bfd"
patch_type: backport
patch_source: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/128
base_path: "util/cairo-trace"
base_path: "source_subfolder/util/cairo-trace"
"1.17.2":
- patch_file: "patches/0001-msvc-update-build-scripts-to-compile-with-more-featu.patch"
base_path: "source_subfolder"
- patch_file: "patches/binutils-2.34-libbfd-fix.patch"
patch_description: "fix build with newer versions of bfd"
patch_type: backport
patch_source: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/128
base_path: "util/cairo-trace"
base_path: "source_subfolder/util/cairo-trace"
"1.16.0":
- patch_file: "patches/0001-msvc-update-build-scripts-to-compile-with-more-featu.patch"
base_path: "source_subfolder"
- patch_file: "patches/binutils-2.34-libbfd-fix.patch"
patch_description: "fix build with newer versions of bfd"
patch_type: backport
patch_source: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/128
base_path: "util/cairo-trace"
base_path: "source_subfolder/util/cairo-trace"
332 changes: 144 additions & 188 deletions recipes/cairo/all/conanfile.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions recipes/cairo/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.1.2)
project(test_package C)

find_package(cairo CONFIG REQUIRED)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE cairo::cairo)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
20 changes: 6 additions & 14 deletions recipes/cairo/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.build import can_run
from conans import ConanFile, CMake, tools
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
test_type = "explicit"

def requirements(self):
self.requires(self.tested_reference_str)

def layout(self):
cmake_layout(self)
generators = "cmake"

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")
if not tools.cross_building(self, skip_x64_x86=True):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)

27 changes: 0 additions & 27 deletions recipes/cairo/all/test_package/test_package.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,8 @@
#include <cairo-version.h>
#include <stdio.h>

#if defined(WIN32) && CAIRO_HAS_WIN32_SURFACE && CAIRO_HAS_WIN32_FONT

#include <cairo-win32.h>
#include <Windows.h>

#endif

int main()
{
#if defined(WIN32) && CAIRO_HAS_WIN32_SURFACE && CAIRO_HAS_WIN32_FONT

HDC hDC = GetDC(0);
if (hDC)
{
cairo_surface_t * surface = cairo_win32_surface_create(hDC);
if (surface)
{
HFONT hFont = (HFONT)GetStockObject(SYSTEM_FONT);
cairo_font_face_t* font = cairo_win32_font_face_create_for_hfont(hFont);
if (font)
cairo_font_face_destroy(font);

cairo_surface_destroy(surface);
}
ReleaseDC(0, hDC);
}
#endif

printf("cairo version is %s\n", cairo_version_string());

return 0;
}
8 changes: 0 additions & 8 deletions recipes/cairo/all/test_v1_package/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions recipes/cairo/all/test_v1_package/conanfile.py

This file was deleted.

2 changes: 1 addition & 1 deletion recipes/cairo/meson/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def requirements(self):
if self.options.with_png:
self.requires("libpng/1.6.39")
if self.options.with_glib:
self.requires("glib/2.75.1")
self.requires("glib/2.75.0")
if self.settings.os == "Linux":
if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb:
self.requires("xorg/system")
Expand Down

0 comments on commit fa27bc7

Please sign in to comment.