{"id":13442783,"url":"https://github.com/lispgames/cl-sdl2","last_synced_at":"2025-03-20T15:30:57.424Z","repository":{"id":8358161,"uuid":"9921723","full_name":"lispgames/cl-sdl2","owner":"lispgames","description":"Common Lisp bindings for SDL2 using C2FFI.","archived":false,"fork":false,"pushed_at":"2024-08-07T22:25:51.000Z","size":3381,"stargazers_count":299,"open_issues_count":18,"forks_count":82,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-08-09T00:11:14.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lispgames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-05-07T21:08:38.000Z","updated_at":"2024-08-09T00:11:14.643Z","dependencies_parsed_at":"2023-02-17T23:15:43.388Z","dependency_job_id":"11cfd414-15fb-4f47-93bc-9398a6f972d6","html_url":"https://github.com/lispgames/cl-sdl2","commit_stats":{"total_commits":341,"total_committers":44,"mean_commits":7.75,"dds":0.6744868035190617,"last_synced_commit":"80410b514570ca06894675d4a2a5fc93287ea7b6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispgames%2Fcl-sdl2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispgames%2Fcl-sdl2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispgames%2Fcl-sdl2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispgames%2Fcl-sdl2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lispgames","download_url":"https://codeload.github.com/lispgames/cl-sdl2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221772553,"owners_count":16878128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:50.628Z","updated_at":"2025-03-20T15:30:57.419Z","avatar_url":"https://github.com/lispgames.png","language":"Common Lisp","readme":"# cl-sdl2\n\n`cl-sdl2` is a Common Lisp wrapper for the SDL 2.0 C Library, with [many contributors](https://github.com/lispgames/cl-sdl2/graphs/contributors), currently maintained by Michael Fiano \u003cmail@mfiano.net\u003e.\n\nIt is licensed under the [MIT license](https://opensource.org/licenses/MIT).\n\n# Installation\n\nsdl2 is in Quicklisp, see below for instructions.\n\n## SDL 2.0 C Library Install\nSee https://wiki.libsdl.org/SDL2/Installation\n\nOn Linux, you can probably find SDL2 in your distribution's package\nset.  For other platforms, or for building manually, [download the\nsource](http://www.libsdl.org/download-2.0.php).\n\n### Package\n* Debian based: Ubuntu, Mint etc\n```bash\nsudo apt-get install libsdl2-2.0\n```\n* Arch\n```bash\nsudo pacman -S sdl2\n```\n\n### Compilation\n\nIf you need to compile from source for your Linux platform:\n\n1. Download [source code](https://www.libsdl.org/download-2.0.php)\n2. Compile\n3. Install\n\nFor example:\n```bash\ncd /tmp\nwget https://www.libsdl.org/release/SDL2-2.0.4.tar.gz\ntar -xzvf SDL2-2.?.?.tar.gz\ncd SDL2-2.?.?\n./configure\nmake\nsudo make install\n```\n\nThis will install the SDL-2.0.x C Library into your /usr/local location.\n\nIt's generally a good idea to install at a minimum the version of SDL2\nthat was wrapped; however, sub revisions should not introduce binary\nincompatibility and should be fine.  If you install a different\nversion, certain features may not be available or may not work\ncorrectly.\n\n## Quicklisp Install\n\nsdl2 is best installed via QuickLisp, though for cutting-edge changes,\nyou may want to install from github as below.\n\nIf you don't have Quicklisp, then follow [the\ndirections](http://www.quicklisp.org/beta/) to install it. We assume\nyou placed the Quicklisp repository in the default place as indicated\nby the directions and have added it to your lisp init file.\n\n## github install\n```bash\ncd $HOME/quicklisp/local-projects\ngit clone https://github.com/rpav/cl-autowrap.git\ngit clone https://github.com/lispgames/cl-sdl2.git\n```\n\nThen, use quicklisp to install the libraries required by cl-sdl2:\n\nStart your lisp. Then, just:\n\n```lisp\n(ql:quickload \"sdl2\")\n```\n\n## Swank/Slynk features\n\nsdl2 enables certain restarts for friendly interaction with SLIME or\nSly if you have either properly installed.  \"Proper installation\" in\nthis case means `swank.asd` or `slynk.asd` is linked such that ASDF\ncan find and load it.\n\nNote this is easily achieved even if you have installed them from\ngithub or some other non-Quicklisp repository:\n\n* Symlink the directory to `$HOME/quicklisp/local-projects/`\n* Symlink the `.asd` to `$HOME/.local/common-lisp/sources/`\n\nSimilarly you could just clone into `~/quicklisp/local-projects` as\nwell; this should work on Windows as well.  There are numerous other\noptions for configuring and managing ASDs, as well.\n\n# Running the sdl2 examples\n\nStart your lisp:\n\n```lisp\n(ql:quickload :sdl2/examples)\n(sdl2-examples:basic-test)\n```\n\nThis example will open a window with an opengl primitive in it. Any mouse\nmovements or keystrokes are recorded in the terminal (or emacs SLIME output\nbuffer ```*inferior-lisp*```). Hitting the ESCAPE key will terminate the example.\n\n## OSX\n\nNewer versions of OSX have had some difficulties as calls which require\n`nextEventMatchingMask` must be called from the main thread of your program.\n\nThis is especially relevant to SBCL, although issues have also been noticed in CCL.\n\nCurrently, initialisation must take place on your main thread:\n\n```lisp\n(ql:quickload :sdl2/examples)\n\n;; We should be able to run examples as normal on CCL\n#-sbcl (sdl2-examples:basic-test)\n\n;; SBCL requires that we initialise in the main thread\n#+sbcl (sdl2:make-this-thread-main #'sdl2-examples:basic-test)\n```\n\nThank you for using sdl2!\n","funding_links":[],"categories":["Common Lisp","Miscellaneous ##"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flispgames%2Fcl-sdl2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flispgames%2Fcl-sdl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flispgames%2Fcl-sdl2/lists"}