-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ec1245e
Showing
21 changed files
with
233 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
image: | ||
- Visual Studio 2017 | ||
|
||
environment: | ||
global: | ||
NAME: glfw | ||
matrix: | ||
- platform: x64 | ||
ARCH: x86_64 | ||
CFLAGS: -m64 | ||
PATH: C:\msys64\mingw64\bin\;C:\msys64\usr\bin\;$(PATH) | ||
PACKAGES: mingw-w64-i686-toolchain mingw-w64-i686-cmake | ||
- platform: x86 | ||
ARCH: i686 | ||
CFLAGS: -m32 | ||
PATH: C:\msys64\mingw32\bin\;C:\msys64\usr\bin\;$(PATH) | ||
PACKAGES: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake | ||
|
||
skip_non_tags: true | ||
|
||
branches: | ||
only: | ||
- master | ||
- "/^v\\d+(\\.\\d+)+$/" | ||
|
||
install: | ||
- git submodule update --init --recursive | ||
|
||
build_script: | ||
- set TARGET_ARTIFACT=lib%NAME%.dll.bodged-%ARCH%-windows-%APPVEYOR_REPO_TAG_NAME% | ||
- pacman -S --needed --noconfirm base-devel %PACKAGES% | ||
- sh -c "cd lib && cmake -G \"Unix Makefiles\" -DCMAKE_C_FLAGS=%CFLAGS% -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=ON -DLIBRARY_OUTPUT_PATH=$APPVEYOR_BUILD_FOLDER/lib -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_INSTALL=OFF -DGLFW_BUILD_EXAMPLES=OFF . && make" | ||
- mv %APPVEYOR_BUILD_FOLDER%\lib\lib%NAME%.dll.bodged %APPVEYOR_BUILD_FOLDER%\%TARGET_ARTIFACT% | ||
|
||
artifacts: | ||
- path: $(TARGET_ARTIFACT) | ||
name: target_artifact | ||
|
||
deploy: | ||
provider: GitHub | ||
release: $(APPVEYOR_REPO_TAG_NAME) | ||
tag: $(APPVEYOR_REPO_TAG_NAME) | ||
description: $(APPVEYOR_REPO_COMMIT_MESSAGE) | ||
auth_token: | ||
secure: Z5XWjDOBlCrmfz3SQAjnLKtdgI5B2b/owJhRPNWYGrI+qwVNbBc4cZiroBZReWP7 | ||
artifact: target_artifact | ||
force_update: true | ||
draft: false | ||
prerelease: false | ||
on: | ||
appveyor_repo_tag: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
spec/*.spec linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# lisp junk | ||
*.FASL | ||
*.fasl | ||
*.lisp-temp | ||
|
||
# emacs junk | ||
\#* | ||
*~ | ||
.\#* | ||
|
||
# system dependent junk | ||
local/ | ||
|
||
# blobs | ||
*.so.* | ||
*.dll.* | ||
*.dylib.* | ||
lib/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lib/glfw"] | ||
path = lib/glfw | ||
url = https://github.com/glfw/glfw.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
language: c | ||
sudo: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- gcc-multilib | ||
- xorg-dev | ||
|
||
env: | ||
global: | ||
- NAME: glfw | ||
- secure: Yug8ZSWsbZKP6p5AbVZ3TG2XiukvZpZPc6K3er+b+576lYhJqgs9EI6wCMsfZtXV8A/Ez+49iW0dEBABOHCNe5mvX6Kr4vACoqywVmJ7IVvpt6hpqNjbQ/nMEdLaf/izxrnL8YKqU8qYcF+aJc4T3EOaz5nKgt2pfZuXgpwSbOhRhQbPxjJ45gyqvYJbccvk72h1WrFnU926EfQ7THb/7VHJLidH+eH5GE+mLj9NY1tZYqNI0LTApVkTBxkfvz8gAC8ZR30W/eitah/cEzBROuvmspvU8CpOib2sfQdm3XDJ0LMo7kwlfUbNshM9l2gNzruwWoDOEtGspnb4Rixll3ZzLFRrlTmlV2a2NfKLCcyeakvRiYzrmcZu8lr3Ve0pZ3WYP2c6a1CnU6FL6kVxEJ+D+EXJLmfIZbZDkxbV39ui+PgaRdQ/CUijVfyn/2XZf8FwJpdJhYSJyznPeAg+7C1U2ea+f2smoAHv/Y7TtetqQip/O8ycKnCfUT6TRZ5JRslY75s8qZE3Q/6XQWWfO3rigrGSKL5tuN4uoB3OM5JeN9m7p1ltklaXh6Mfiph8/WnLtlAFGKh2B9RuOPU3ffcIYudHIy7dVPuGkVwdvbQuroDQZEnrxO5ptefT8qlaKJzs/aczlgm9F6qKu1p/BS5XAJjvWj9g1oulWAwctRU= | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
env: | ||
- ARCH=i686 | ||
- CFLAGS=-m32 | ||
- EXTENSION=so | ||
- os: linux | ||
env: | ||
- ARCH=x86_64 | ||
- CFLAGS=-m64 | ||
- EXTENSION=so | ||
- os: osx | ||
env: | ||
- ARCH=i686 | ||
- CFLAGS=-m32 | ||
- EXTENSION=dylib | ||
- os: osx | ||
env: | ||
- ARCH=x86_64 | ||
- CFLAGS=-m64 | ||
- EXTENSION=dylib | ||
|
||
branches: | ||
only: | ||
- "/^v\\d+(\\.\\d+)+$/" | ||
|
||
|
||
script: | ||
- > | ||
cd lib/ && cmake -G "Unix Makefiles" \ | ||
-DCMAKE_C_FLAGS=$(CFLAGS) \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DLIBRARY_OUTPUT_PATH=$TRAVIS_BUILD_DIR/lib \ | ||
-DGLFW_BUILD_TESTS=OFF \ | ||
-DGLFW_BUILD_DOCS=OFF \ | ||
-DGLFW_INSTALL=OFF \ | ||
-DGLFW_BUILD_EXAMPLES=OFF . && \ | ||
make | ||
before_deploy: | ||
- export TARGET_FILE=$TRAVIS_BUILD_DIR/lib$NAME.$EXTENSION.bodged-$ARCH-$TRAVIS_OS_NAME-$TRAVIS_BRANCH | ||
- mv $TRAVIS_BUILD_DIR/lib/lib$NAME.$EXTENSION.bodged $TARGET_FILE | ||
|
||
deploy: | ||
provider: releases | ||
api-key: $GITHUB_TOKEN | ||
file: $TARGET_FILE | ||
skip_cleanup: true | ||
overwrite: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Pavel Korolev | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# bodge glfw wrapper | ||
|
||
Thin wrapper over [`GLFW`](http://chipmunk-physics.net/) OS abstraction and GL/Vulkan context | ||
handling library. | ||
|
||
# Requirements | ||
|
||
* ASDF/Quicklisp | ||
* x86_64/i686 GNU/Linux, macOS or Windows | ||
|
||
# Loading | ||
```lisp | ||
(ql:quickload '(glfw-blob bodge-glfw)) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(asdf:defsystem bodge-glfw | ||
:description "Wrapper over glfw3 library" | ||
:version "1.0.0" | ||
:author "Pavel Korolev" | ||
:mailto "[email protected]" | ||
:license "MIT" | ||
:depends-on (alexandria cffi claw) | ||
:serial t | ||
:components ((:file "packages") | ||
(:file "libglfw") | ||
(:static-file "bodge_glfw.h") | ||
(:file "claw") | ||
(:file "glfw") | ||
(:module spec))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef _BODGE_CHIPMUNK_H_ | ||
#define _BODGE_CHIPMUNK_H_ | ||
|
||
#include <GLFW/glfw3.h> | ||
|
||
#endif /* _BODGE_CHIPMUNK_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(claw:c-include "bodge_glfw.h" bodge-glfw | ||
:in-package :%glfw | ||
:include-definitions ("(glfw|GLFW)\\w*") | ||
:exclude-definitions ("(GL|gl)(?!(FW|fw))\\w*" | ||
"^PFN\\w*" | ||
"glfwGetProcAddress") | ||
:rename-symbols (claw:by-removing-prefixes "glfw" "GLFW" "GLFW_")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(in-package :glfw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
|
||
project(glfw.bodged) | ||
|
||
add_subdirectory(glfw) | ||
|
||
set_target_properties(glfw PROPERTIES | ||
OUTPUT_NAME glfw | ||
VERSION bodged | ||
SOVERSION bodged | ||
POSITION_INDEPENDENT_CODE ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(cffi:define-foreign-library (glfw:libglfw | ||
:search-path (asdf:system-relative-pathname :bodge-glfw "lib/")) | ||
(:darwin "libglfw.dylib.bodged") | ||
(:unix "libglfw.so.bodged") | ||
(:windows "libglfw.dll.bodged")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(cl:defpackage :%glfw | ||
(:use)) | ||
|
||
(cl:defpackage :glfw | ||
(:use :cl :claw :alexandria) | ||
(:export libglfw)) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.