@ -7,6 +7,8 @@
( import "ComptimeHelpers.cake" )
;; Use the s- strings with this. The g- ones are for your application at runtime, if you need to
;; directly reference a license outside the g-licenses
( defmacro register-module-license ( module-name string license symbol )
( get-or-create-comptime-var module-licenses
( template ( in std vector )
@ -84,8 +86,8 @@
license ( addr ( const char ) ) )
;; These need to go somewhere, so we might as well have Licenses register them
( register-module-license "GameLib" g -gamelib-copyright-string)
( register-module-license "Cakelisp" g -cakelisp-copyright-string)
( register-module-license "GameLib" s -gamelib-copyright-string)
( register-module-license "Cakelisp" s -cakelisp-copyright-string)
;; g-gamelib-copyright-string
;; g-gnu-gpl-license-string
@ -97,7 +99,7 @@
;; g-sdl-license-string
;; g-enkits-license-string
( var g -gamelib-copyright-string ( const ( addr ( const char ) ) )
( var s -gamelib-copyright-string ( const ( addr ( const char ) ) )
# " # GameLib
Created by Macoy Madson <macoy@macoy.me>.
https://macoy.me/code/macoy/gamelib
@ -116,7 +118,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GameLib. If not, see <https://www.gnu.org/licenses/>.# " # )
( var g -cakelisp-copyright-string ( const ( addr ( const char ) ) )
( var s -cakelisp-copyright-string ( const ( addr ( const char ) ) )
# " # Cakelisp
Created by Macoy Madson <macoy@macoy.me>.
https://macoy.me/code/macoy/gamelib
@ -135,7 +137,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Cakelisp. If not, see <https://www.gnu.org/licenses/>.# " # )
( var g -gnu-gpl-license-string ( const ( addr ( const char ) ) )
( var s -gnu-gpl-license-string ( const ( addr ( const char ) ) )
# " # GNU GENERAL PUBLIC LICENSE
Version 3 , 29 June 2007
@ -763,7 +765,7 @@ License instead of this License. But first, please read <https://www.gnu.org/
licenses /why-not-lgpl.html>.
# " # )
( var g -ubuntu-font-license-string ( const ( addr ( const char ) ) ) # " #- ------------------------------
( var s -ubuntu-font-license-string ( const ( addr ( const char ) ) ) # " #- ------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------
@ -860,7 +862,7 @@ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.# " # )
( var g -apache-license-string ( const ( addr ( const char ) ) ) # " # Apache License
( var s -apache-license-string ( const ( addr ( const char ) ) ) # " # Apache License
Version 2.0 , January 2004
http://www.apache.org/licenses/
@ -1062,7 +1064,7 @@ DEALINGS IN THE FONT SOFTWARE.#"#)
See the License for the specific language governing permissions and
limitations under the License.# " # )
( var g -imgui-license-string ( const ( addr ( const char ) ) ) # " # The MIT License ( MIT )
( var s -imgui-license-string ( const ( addr ( const char ) ) ) # " # The MIT License ( MIT )
Copyright ( c ) 2014-2021 Omar Cornut
@ -1084,7 +1086,7 @@ 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.# " # )
( var g -handmade-math-license-string ( const ( addr ( const char ) ) )
( var s -handmade-math-license-string ( const ( addr ( const char ) ) )
# " # CC0 1.0 Universal
Statement of Purpose
@ -1202,7 +1204,7 @@ Affirmer's express Statement of Purpose.
For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/># " # )
( var g -stb-license-string ( const ( addr ( const char ) ) ) # " # MIT License
( var s -stb-license-string ( const ( addr ( const char ) ) ) # " # MIT License
Copyright ( c ) 2017 Sean Barrett
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
@ -1220,7 +1222,7 @@ 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.# " # )
( var g -sdl-license-string ( const ( addr ( const char ) ) ) # " # Copyright ( C ) 1997-2021 Sam Lantinga <slouken@libsdl.org>
( var s -sdl-license-string ( const ( addr ( const char ) ) ) # " # Copyright ( C ) 1997-2021 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is ', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -1238,7 +1240,7 @@ freely, subject to the following restrictions:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.# " # )
( var g -enkits-license-string ( const ( addr ( const char ) ) ) # " # Copyright ( c ) 2013 Doug Binks
( var s -enkits-license-string ( const ( addr ( const char ) ) ) # " # Copyright ( c ) 2013 Doug Binks
This software is provided 'as-is ', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -1256,7 +1258,7 @@ freely, subject to the following restrictions:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.# " # )
( var g -oniguruma-license-string ( const ( addr ( const char ) ) )
( var s -oniguruma-license-string ( const ( addr ( const char ) ) )
# " # Oniguruma LICENSE
-----------------
@ -1285,7 +1287,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
# " # )
( var g -auto-color-license-string ( const ( addr ( const char ) ) )
( var s -auto-color-license-string ( const ( addr ( const char ) ) )
# " # Copyright ( c ) 2022 Macoy Madson
Email: macoy@macoy.me
@ -1315,7 +1317,7 @@ https://creativecommons.org/licenses/by/3.0/
Copied from https://github.com/mixaal/imageprocessor.
Modified by converting to Cakelisp by Macoy Madson.# " # )
( var g -miniz-license-string ( const ( addr ( const char ) ) )
( var s -miniz-license-string ( const ( addr ( const char ) ) )
# " # Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
@ -1339,7 +1341,7 @@ 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.# " # )
( var g -curl-license-string ( const ( addr ( const char ) ) )
( var s -curl-license-string ( const ( addr ( const char ) ) )
# " # COPYRIGHT AND PERMISSION NOTICE
Copyright ( c ) 1996 - 2022 , Daniel Stenberg, <daniel@haxx.se>, and many
@ -1363,7 +1365,7 @@ Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.# " # )
( var g -gnu-glib-license ( const ( addr ( const char ) ) )
( var s -gnu-glib-license ( const ( addr ( const char ) ) )
# " # GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1 , February 1999
@ -1871,3 +1873,20 @@ That's all there is to it!
;; Populated at compile-time
( var-global g-licenses ( array module-license ) ( array 0 ) )
( var-global g-licenses-count int 0 )
;; I did this to get around C requiring constant intializers for g-licences while still allowing
;; some global reference to the strings
( var-global g-gnu-gpl-license-string ( const ( addr ( const char ) ) ) s-gnu-gpl-license-string )
( var-global g-ubuntu-font-license-string ( const ( addr ( const char ) ) ) s-ubuntu-font-license-string )
( var-global g-apache-license-string ( const ( addr ( const char ) ) ) s-apache-license-string )
( var-global g-imgui-license-string ( const ( addr ( const char ) ) ) s-imgui-license-string )
( var-global g-handmade-math-license-string ( const ( addr ( const char ) ) ) s-handmade-math-license-string )
( var-global g-stb-license-string ( const ( addr ( const char ) ) ) s-stb-license-string )
( var-global g-sdl-license-string ( const ( addr ( const char ) ) ) s-sdl-license-string )
( var-global g-enkits-license-string ( const ( addr ( const char ) ) ) s-enkits-license-string )
( var-global g-oniguruma-license-string ( const ( addr ( const char ) ) ) s-oniguruma-license-string )
( var-global g-auto-color-license-string ( const ( addr ( const char ) ) ) s-auto-color-license-string )
( var-global g-miniz-license-string ( const ( addr ( const char ) ) ) s-miniz-license-string )
( var-global g-curl-license-string ( const ( addr ( const char ) ) ) s-curl-license-string )
( var-global g-gnu-glib-license ( const ( addr ( const char ) ) ) s-gnu-glib-license )
( var-global g-cakelisp-copyright-string ( const ( addr ( const char ) ) ) s-cakelisp-copyright-string )